### Initialize and Allocate Struct Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceCooperativeMatrixFeaturesNV.html Demonstrates how to instantiate the struct using different memory allocation strategies such as malloc, calloc, or wrapping an existing ByteBuffer. ```java ByteBuffer buffer = ByteBuffer.allocateDirect(SIZEOF); VkPhysicalDeviceCooperativeMatrixFeaturesNV features = new VkPhysicalDeviceCooperativeMatrixFeaturesNV(buffer); // Allocate using native memory VkPhysicalDeviceCooperativeMatrixFeaturesNV nativeInstance = VkPhysicalDeviceCooperativeMatrixFeaturesNV.calloc(); // Remember to free native memory nativeInstance.free(); ``` -------------------------------- ### Get SDL_TextEditingEvent Start Field Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDL_TextEditingEvent.Buffer.html Retrieves the value of the 'start' field from an SDL_TextEditingEvent. The 'start' field indicates the starting position of the text edit. ```java @NativeType("Sint32") public int start() ``` -------------------------------- ### Unsafe Get start (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDL_HapticRamp.html Provides an unsafe method to get the 'start' field of an SDL_HapticRamp struct from a given memory address. Use with caution. ```java public static short nstart(long struct) ``` -------------------------------- ### Initialize and Configure Struct Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkVertexInputBindingDivisorDescriptionKHR.html Example demonstrating how to instantiate and configure the VkVertexInputBindingDivisorDescriptionKHR struct using LWJGL's memory management utilities. ```Java try (MemoryStack stack = MemoryStack.stackPush()) { VkVertexInputBindingDivisorDescriptionKHR divisorDesc = VkVertexInputBindingDivisorDescriptionKHR.calloc(stack); divisorDesc.binding(0); divisorDesc.divisor(1); } ``` -------------------------------- ### Create VkVideoInlineQueryInfoKHR Instances (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkVideoInlineQueryInfoKHR.html Demonstrates various ways to create instances of VkVideoInlineQueryInfoKHR, including allocation with memCalloc, BufferUtils, and MemoryStack. It also shows how to create instances from a given memory address. ```java VkVideoInlineQueryInfoKHR instance1 = VkVideoInlineQueryInfoKHR.calloc(); VkVideoInlineQueryInfoKHR instance2 = VkVideoInlineQueryInfoKHR.malloc(); VkVideoInlineQueryInfoKHR instance3 = VkVideoInlineQueryInfoKHR.create(); VkVideoInlineQueryInfoKHR instance4 = VkVideoInlineQueryInfoKHR.create(address); VkVideoInlineQueryInfoKHR.Buffer buffer1 = VkVideoInlineQueryInfoKHR.calloc(capacity); VkVideoInlineQueryInfoKHR.Buffer buffer2 = VkVideoInlineQueryInfoKHR.malloc(capacity); VkVideoInlineQueryInfoKHR.Buffer buffer3 = VkVideoInlineQueryInfoKHR.create(capacity); VkVideoInlineQueryInfoKHR.Buffer buffer4 = VkVideoInlineQueryInfoKHR.create(address, capacity); VkVideoInlineQueryInfoKHR instance5 = VkVideoInlineQueryInfoKHR.calloc(stack); VkVideoInlineQueryInfoKHR.Buffer buffer5 = VkVideoInlineQueryInfoKHR.calloc(capacity, stack); VkVideoInlineQueryInfoKHR instance6 = VkVideoInlineQueryInfoKHR.malloc(stack); VkVideoInlineQueryInfoKHR.Buffer buffer6 = VkVideoInlineQueryInfoKHR.malloc(capacity, stack); ``` -------------------------------- ### Get Joystick GUID Source: https://javadoc.lwjgl.org/org/lwjgl/glfw/GLFW.html Retrieves the GUID of the specified joystick. The GUID is a unique identifier for the joystick that is consistent across different runs of an application. ```c char const * glfwGetJoystickGUID(int jid) ``` -------------------------------- ### Instantiate and Configure Struct Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR.html Demonstrates how to create an instance of the struct using a ByteBuffer and configure its fields using the provided setter methods. ```java ByteBuffer buffer = ByteBuffer.allocateDirect(SIZEOF); VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR features = new VkPhysicalDeviceShaderRelaxedExtendedInstructionFeaturesKHR(buffer); features.sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR); features.shaderRelaxedExtendedInstruction(true); ``` -------------------------------- ### Get Event Description ID (Java/C) Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMODStudio.html Retrieves the unique identifier (GUID) for an FMOD Studio event description. This function is used to get the ID associated with a specific event. It requires an event description handle and a pointer to store the GUID. ```java @NativeType("FMOD_RESULT") public static int FMOD_Studio_EventDescription_GetID(long eventdescription, long id) ``` ```c FMOD_RESULT FMOD_Studio_EventDescription_GetID(FMOD_STUDIO_EVENTDESCRIPTION * eventdescription, FMOD_GUID * id) ``` -------------------------------- ### Initialize VkPhysicalDeviceShaderCorePropertiesAMD.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCorePropertiesAMD.Buffer.html Demonstrates how to instantiate the buffer class using a memory address and capacity, or a ByteBuffer container. ```java // Initialize with address and capacity VkPhysicalDeviceShaderCorePropertiesAMD.Buffer buffer = new VkPhysicalDeviceShaderCorePropertiesAMD.Buffer(address, capacity); // Initialize with a ByteBuffer container VkPhysicalDeviceShaderCorePropertiesAMD.Buffer bufferFromBuffer = new VkPhysicalDeviceShaderCorePropertiesAMD.Buffer(byteBuffer); ``` -------------------------------- ### Get Joystick GUID (Java, C) Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDLJoystick.html Retrieves the Globally Unique Identifier (GUID) for a joystick. This function has overloads for direct GUID retrieval and for populating a provided SDL_GUID structure. ```Java public static void nSDL_GetJoystickGUID(long joystick, long __result) ``` ```C SDL_GUID SDL_GetJoystickGUID(SDL_Joystick * joystick) ``` ```Java public static SDL_GUID SDL_GetJoystickGUID(@NativeType("SDL_Joystick *") long joystick, SDL_GUID __result) ``` -------------------------------- ### Get SDL Joystick Player Index and GUID (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDLJoystick.html Obtains the player index and GUID for a given SDL joystick instance ID. The GUID is returned via a provided SDL_GUID object. ```Java public static int SDL_GetJoystickPlayerIndexForID(@NativeType("SDL_JoystickID") int instance_id) public static SDL_GUID SDL_GetJoystickGUIDForID(@NativeType("SDL_JoystickID") int instance_id, SDL_GUID __result) ``` -------------------------------- ### Initialize VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer.html Demonstrates how to instantiate the buffer using a ByteBuffer container or a direct memory address. ```java import org.lwjgl.vulkan.VkPhysicalDeviceDisplacementMicromapPropertiesNV; import java.nio.ByteBuffer; // Initialize via ByteBuffer ByteBuffer container = ByteBuffer.allocateDirect(VkPhysicalDeviceDisplacementMicromapPropertiesNV.SIZEOF); VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer buffer = new VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer(container); // Initialize via direct address VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer directBuffer = new VkPhysicalDeviceDisplacementMicromapPropertiesNV.Buffer(address, capacity); ``` -------------------------------- ### Get Simulation Start Time (microseconds) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkLatencyTimingsFrameReportNV.html Retrieves the simulation start time in microseconds. This is a long integer value. ```Java long simStartTimeUs(); ``` -------------------------------- ### Initialize Struct Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderImageFootprintFeaturesNV.html Demonstrates how to create a new instance of the struct from a ByteBuffer, which allows for direct memory mapping and interaction with the underlying native Vulkan structure. ```java public VkPhysicalDeviceShaderImageFootprintFeaturesNV(ByteBuffer container) { // Creates an instance at the current position of the specified ByteBuffer super(container); } ``` -------------------------------- ### Get LLVM Buffer Start Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/LLVMCore.html Retrieves the starting address of an LLVM memory buffer. This allows direct access to the buffer's content. ```c char const * LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf) ``` -------------------------------- ### VkPipelineRenderingCreateInfo Initialization and Copying (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPipelineRenderingCreateInfo.html Demonstrates methods for initializing a VkPipelineRenderingCreateInfo struct with multiple values at once or for copying the contents of another VkPipelineRenderingCreateInfo instance. This includes a comprehensive 'set' method and a copy constructor-like method. ```java public VkPipelineRenderingCreateInfo set(int sType, long pNext, int viewMask, int colorAttachmentCount, @Nullable IntBuffer pColorAttachmentFormats, int depthAttachmentFormat, int stencilAttachmentFormat) public VkPipelineRenderingCreateInfo set(VkPipelineRenderingCreateInfo src) ``` -------------------------------- ### Initialize Buffer Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.Buffer.html Demonstrates how to instantiate a Buffer object backed by a ByteBuffer, allowing for direct interaction with native Vulkan memory structures. ```java import java.nio.ByteBuffer; import org.lwjgl.vulkan.VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV; // Create a buffer instance backed by a container ByteBuffer container = ByteBuffer.allocateDirect(VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.SIZEOF); VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.Buffer buffer = new VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV.Buffer(container); ``` -------------------------------- ### Get LLVM Memory Buffer Start Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/LLVMCore.html Retrieves the starting address of the buffer for an LLVM memory buffer. This function has a C-style and a simplified native interface. ```c char const * LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf) static long nLLVMGetBufferStart(long MemBuf) ``` -------------------------------- ### Get Joystick GUID (C/Java) Source: https://javadoc.lwjgl.org/org/lwjgl/glfw/GLFW.html Retrieves the GUID of the specified joystick. The C version returns a char pointer, while the Java version returns a String. ```c char const * glfwGetJoystickGUID(int jid); ``` ```java static @Nullable String glfwGetJoystickGUID(int jid); ``` -------------------------------- ### Initialize Buffer Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.Buffer.html Demonstrates how to instantiate a Buffer object using a ByteBuffer container, which links the buffer to a specific memory region. ```java import org.lwjgl.vulkan.VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT; import java.nio.ByteBuffer; // Create a buffer instance backed by a ByteBuffer VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.Buffer buffer = new VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT.Buffer(container); ``` -------------------------------- ### Get NkEditState Selection Start Field Source: https://javadoc.lwjgl.org/org/lwjgl/nuklear/NkEditState.Buffer.html Retrieves the value of the 'sel_start' field from the NkEditState struct. This method returns the integer value of the selection start position. ```java public int sel_start() { return sel_start(address()); } ``` -------------------------------- ### Initialize VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.html Demonstrates how to instantiate the struct using a ByteBuffer or memory allocation methods. These methods allow for direct interaction with native Vulkan memory structures. ```java ByteBuffer container = ByteBuffer.allocateDirect(SIZEOF); VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM features = new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM(container); // Allocation methods VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM malloced = VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.malloc(); VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM calloced = VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.calloc(); ``` -------------------------------- ### Initialize Struct Instance in Java Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPipelineViewportShadingRateImageStateCreateInfoNV.html Demonstrates how to create a new instance of the struct using a ByteBuffer container, allowing for direct memory mapping between Java and native Vulkan structures. ```java public VkPipelineViewportShadingRateImageStateCreateInfoNV(ByteBuffer container) { super(container); } ``` -------------------------------- ### GET /xrGetAudioOutputDeviceGuidOculus Source: https://javadoc.lwjgl.org/org/lwjgl/openxr/OCULUSAudioDeviceGuid.html Retrieves the audio output device GUID for the specified Oculus instance. ```APIDOC ## GET xrGetAudioOutputDeviceGuidOculus ### Description Retrieves the unique identifier for the Oculus audio output device. ### Method GET ### Endpoint xrGetAudioOutputDeviceGuidOculus(XrInstance instance, ByteBuffer buffer) ### Parameters #### Path Parameters - **instance** (XrInstance) - Required - The OpenXR instance handle. - **buffer** (ByteBuffer) - Required - A buffer to store the resulting wide-character string GUID. ### Request Example { "instance": "0x00000000", "buffer": "ByteBuffer(size=XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS)" } ### Response #### Success Response (200) - **result** (int) - Returns XrResult indicating success or failure. #### Response Example { "result": 0 } ``` -------------------------------- ### GET /xrGetAudioInputDeviceGuidOculus Source: https://javadoc.lwjgl.org/org/lwjgl/openxr/OCULUSAudioDeviceGuid.html Retrieves the audio input device GUID for the specified Oculus instance. ```APIDOC ## GET xrGetAudioInputDeviceGuidOculus ### Description Retrieves the unique identifier for the Oculus audio input device. ### Method GET ### Endpoint xrGetAudioInputDeviceGuidOculus(XrInstance instance, ByteBuffer buffer) ### Parameters #### Path Parameters - **instance** (XrInstance) - Required - The OpenXR instance handle. - **buffer** (ByteBuffer) - Required - A buffer to store the resulting wide-character string GUID. ### Request Example { "instance": "0x00000000", "buffer": "ByteBuffer(size=XR_MAX_AUDIO_DEVICE_STR_SIZE_OCULUS)" } ### Response #### Success Response (200) - **result** (int) - Returns XrResult indicating success or failure. #### Response Example { "result": 0 } ``` -------------------------------- ### Allocate and Initialize Struct Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPipelineViewportDepthClampControlCreateInfoEXT.html Examples of various memory allocation strategies for the struct, including manual allocation and creating instances from existing memory addresses. ```java // Allocate new instance with memAlloc VkPipelineViewportDepthClampControlCreateInfoEXT instance = VkPipelineViewportDepthClampControlCreateInfoEXT.malloc(); // Create instance from existing address VkPipelineViewportDepthClampControlCreateInfoEXT struct = VkPipelineViewportDepthClampControlCreateInfoEXT.create(address); // Explicitly free memory instance.free(); ``` -------------------------------- ### Get Source Range Start and End Locations Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.html These functions retrieve the starting and ending source locations from a given CXSourceRange. They are essential for pinpointing specific regions within source code files. ```c CXSourceLocation clang_getRangeStart(CXSourceRange range) CXSourceLocation clang_getRangeEnd(CXSourceRange range) ``` ```java static CXSourceLocation clang_getRangeStart(CXSourceRange range) static CXSourceLocation clang_getRangeEnd(CXSourceRange range) ``` -------------------------------- ### Initialize VkPhysicalDeviceVideoFormatInfoKHR instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceVideoFormatInfoKHR.html Demonstrates how to instantiate the struct using a ByteBuffer container or via memory allocation methods. These methods allow for direct interaction with native memory. ```Java ByteBuffer buffer = ByteBuffer.allocateDirect(SIZEOF); VkPhysicalDeviceVideoFormatInfoKHR info = new VkPhysicalDeviceVideoFormatInfoKHR(buffer); // Or using allocation utilities VkPhysicalDeviceVideoFormatInfoKHR allocated = VkPhysicalDeviceVideoFormatInfoKHR.calloc(); // ... use the struct ... allocated.free(); ``` -------------------------------- ### Initialize and Configure Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceCustomResolveFeaturesEXT.Buffer.html Demonstrates how to instantiate a buffer from a ByteBuffer and configure its fields such as sType and customResolve. ```java import org.lwjgl.vulkan.VkPhysicalDeviceCustomResolveFeaturesEXT; import java.nio.ByteBuffer; // Create buffer from existing container ByteBuffer container = ByteBuffer.allocateDirect(VkPhysicalDeviceCustomResolveFeaturesEXT.SIZEOF); VkPhysicalDeviceCustomResolveFeaturesEXT.Buffer buffer = new VkPhysicalDeviceCustomResolveFeaturesEXT.Buffer(container); // Configure fields buffer.sType$Default(); buffer.customResolve(true); buffer.pNext(0L); ``` -------------------------------- ### Get Joystick GUID Info (Java, C) Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDLJoystick.html Retrieves detailed information about a joystick GUID, including vendor, product, version, and CRC16. This function has overloads for direct pointer manipulation and for populating ShortBuffers. ```Java public static void nSDL_GetJoystickGUIDInfo(long guid, long vendor, long product, long version, long crc16) ``` ```C void SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 * vendor, Uint16 * product, Uint16 * version, Uint16 * crc16) ``` ```Java public static void SDL_GetJoystickGUIDInfo(SDL_GUID guid, @NativeType("Uint16 *") @Nullable ShortBuffer vendor, @NativeType("Uint16 *") @Nullable ShortBuffer product, @NativeType("Uint16 *") @Nullable ShortBuffer version, @NativeType("Uint16 *") @Nullable ShortBuffer crc16) ``` -------------------------------- ### Get Range Start - C and Java Bindings Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.html Retrieves the start location of a source range. This function is documented with its C signature and Java bindings, including versions with an explicit function address parameter. ```c CXSourceLocation clang_getRangeStart(CXSourceRange range); static void nclang_getRangeStart(long range, long __result); static void nclang_getRangeStart(long range, long __functionAddress, long __result); ``` ```java static native void nclang_getRangeStart(long range, long __result); static native void nclang_getRangeStart(long range, long __functionAddress, long __result); ``` -------------------------------- ### Initialize VkSamplerCreateInfo.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkSamplerCreateInfo.Buffer.html Demonstrates how to instantiate a buffer for VkSamplerCreateInfo, either by specifying a memory address and capacity or by wrapping an existing ByteBuffer. ```java VkSamplerCreateInfo.Buffer buffer = new VkSamplerCreateInfo.Buffer(address, cap); VkSamplerCreateInfo.Buffer bufferFromContainer = new VkSamplerCreateInfo.Buffer(byteBuffer); ``` -------------------------------- ### Get Joystick GUID (LWJGL/C) Source: https://javadoc.lwjgl.org/org/lwjgl/glfw/GLFW.html Retrieves the GUID (Globally Unique Identifier) of a joystick. This function is available in LWJGL (Java) as a String return type and in C as a char pointer. It requires the joystick ID. ```java @NativeType("char const *") public static @Nullable String glfwGetJoystickGUID(int jid) ``` ```c char const *glfwGetJoystickGUID(int jid) ``` -------------------------------- ### Initialize VkPhysicalDeviceShaderCoreProperties2AMD instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCoreProperties2AMD.html Demonstrates how to create a new instance of the struct using a ByteBuffer, which maps the struct to native memory. ```java public VkPhysicalDeviceShaderCoreProperties2AMD(ByteBuffer container) { // Creates an instance at the current position of the specified ByteBuffer } ``` -------------------------------- ### Get GPU Timer Begin Time - Java Source: https://javadoc.lwjgl.org/org/lwjgl/bgfx/BGFXStats.Buffer.html Retrieves the starting timestamp of the GPU timer. This method returns the value of the `gpuTimeBegin` field, indicating when the GPU timing measurement started. ```java @NativeType("int64_t") public long gpuTimeBegin() Returns: the value of the `gpuTimeBegin` field. ``` -------------------------------- ### Initialize VkCommandBufferBeginInfo Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkCommandBufferBeginInfo.html Demonstrates how to instantiate a VkCommandBufferBeginInfo object using a ByteBuffer container, which allows for direct memory mapping between Java and native Vulkan structures. ```Java public VkCommandBufferBeginInfo(ByteBuffer container) { // Creates a VkCommandBufferBeginInfo instance at the current position of the specified ByteBuffer container. } ``` -------------------------------- ### Initialize Buffer Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.Buffer.html Demonstrates how to instantiate a Buffer object using an existing ByteBuffer container or a raw memory address. ```java ByteBuffer container = ByteBuffer.allocateDirect(VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.SIZEOF); VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.Buffer buffer = new VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.Buffer(container); ``` -------------------------------- ### Get CPU Timer Begin Time - Java Source: https://javadoc.lwjgl.org/org/lwjgl/bgfx/BGFXStats.Buffer.html Retrieves the starting timestamp of the CPU timer. This method returns the value of the `cpuTimeBegin` field, indicating when the CPU timing measurement started. ```java @NativeType("int64_t") public long cpuTimeBegin() Returns: the value of the `cpuTimeBegin` field. ``` -------------------------------- ### Get Token Location Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.html Retrieves the source location of a given CXToken. This complements `clang_getTokenExtent` by providing the starting point of the token. ```c CXSourceLocation clang_getTokenLocation(CXTranslationUnit TU, CXToken token) ``` ```java static CXSourceLocation clang_getTokenLocation(long TU, CXToken token, CXSourceLocation __result) ``` -------------------------------- ### Initialize and Configure Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.Buffer.html Demonstrates how to instantiate a buffer from a ByteBuffer and configure its fields such as sType and clusterShadingRate. ```java import org.lwjgl.vulkan.VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI; import java.nio.ByteBuffer; // Create a buffer from an existing ByteBuffer VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.Buffer buffer = new VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI.Buffer(container); // Configure fields buffer.sType$Default(); buffer.clusterShadingRate(true); buffer.pNext(0L); ``` -------------------------------- ### Struct Initialization and Memory Management Source: https://javadoc.lwjgl.org/org/lwjgl/openxr/XrSpatialCapabilityConfigurationMicroQrCodeEXT.html Provides methods to initialize the struct from individual components or copy data from an existing instance. Also includes validation logic for pointer members. ```java public XrSpatialCapabilityConfigurationMicroQrCodeEXT set(int type, long next, int capability, IntBuffer enabledComponents); public XrSpatialCapabilityConfigurationMicroQrCodeEXT set(XrSpatialCapabilityConfigurationMicroQrCodeEXT src); public static void validate(long struct); public int sizeof(); ``` -------------------------------- ### GET /clang/HTMLStartTag/attr Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangDocumentation.html Retrieves attribute names or values from an HTML start tag comment. ```APIDOC ## GET /clang/HTMLStartTag/attr ### Description Retrieves the name or value of an attribute at a specific index for an HTML start tag. ### Method GET ### Endpoint /clang/HTMLStartTag/attr ### Parameters #### Query Parameters - **Comment** (long) - Required - The pointer to the CXComment structure. - **AttrIdx** (int) - Required - The index of the attribute to retrieve. ### Response #### Success Response (200) - **attrValue** (CXString) - The requested attribute name or value. #### Response Example { "attrValue": "class-name" } ``` -------------------------------- ### Initialize and Configure VkDeviceGroupCommandBufferBeginInfoKHR.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkDeviceGroupCommandBufferBeginInfoKHR.Buffer.html Demonstrates how to instantiate a buffer from a ByteBuffer and configure its fields using the fluent API provided by the LWJGL Vulkan bindings. ```java import org.lwjgl.vulkan.VkDeviceGroupCommandBufferBeginInfoKHR; import java.nio.ByteBuffer; // Assuming 'container' is a valid ByteBuffer allocated with sufficient capacity ByteBuffer container = ByteBuffer.allocateDirect(VkDeviceGroupCommandBufferBeginInfoKHR.SIZEOF); VkDeviceGroupCommandBufferBeginInfoKHR.Buffer buffer = new VkDeviceGroupCommandBufferBeginInfoKHR.Buffer(container); // Configure the buffer fields buffer.sType$Default() .pNext(0L) .deviceMask(0x1); ``` -------------------------------- ### GET /vulkan/latency-timings Source: https://javadoc.lwjgl.org/index-files/index-4.html Retrieves latency timing information for frame reports, specifically start and end times for driver operations. ```APIDOC ## GET /vulkan/latency-timings ### Description Retrieves the driver start and end timestamps for latency-sensitive frame reporting. ### Method GET ### Endpoint /vulkan/latency-timings ### Parameters #### Query Parameters - **frameId** (int) - Required - The frame index to retrieve timing data for. ### Request Example { "frameId": 1024 } ### Response #### Success Response (200) - **driverStartTimeUs** (long) - Start time of the driver operation in microseconds. - **driverEndTimeUs** (long) - End time of the driver operation in microseconds. #### Response Example { "driverStartTimeUs": 1625000000, "driverEndTimeUs": 1625000050 } ``` -------------------------------- ### SpvcHlslRootConstants.Buffer Field Accessors (Get) Source: https://javadoc.lwjgl.org/org/lwjgl/util/spvc/SpvcHlslRootConstants.Buffer.html Methods to retrieve the values of the 'start', 'end', 'binding', and 'space' fields from a SpvcHlslRootConstants.Buffer. ```java @NativeType("unsigned int") public int start() Returns: the value of the `start` field. ``` ```java @NativeType("unsigned int") public int end() Returns: the value of the `end` field. ``` ```java @NativeType("unsigned int") public int binding() Returns: the value of the `binding` field. ``` ```java @NativeType("unsigned int") public int space() Returns: the value of the `space` field. ``` -------------------------------- ### VkPhysicalDeviceShaderCorePropertiesARM.Buffer Constructors Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCorePropertiesARM.Buffer.html Provides details on how to instantiate a VkPhysicalDeviceShaderCorePropertiesARM.Buffer. ```APIDOC ## Constructors ### `Buffer(ByteBuffer container)` Creates a new `VkPhysicalDeviceShaderCorePropertiesARM.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 `VkPhysicalDeviceShaderCorePropertiesARM.SIZEOF`, and its mark will be undefined. The created buffer instance holds a strong reference to the container object. ### `Buffer(long address, int cap)` Constructs a buffer with the specified memory address and capacity. ``` -------------------------------- ### Get Fields from VkDedicatedAllocationBufferCreateInfoNV.Buffer (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkDedicatedAllocationBufferCreateInfoNV.Buffer.html Provides examples of retrieving the values of 'sType', 'pNext', and 'dedicatedAllocation' fields from a VkDedicatedAllocationBufferCreateInfoNV.Buffer instance. ```java VkDedicatedAllocationBufferCreateInfoNV.Buffer struct = ...; int sType = struct.sType(); long pNext = struct.pNext(); boolean dedicatedAllocation = struct.dedicatedAllocation(); ``` -------------------------------- ### Initialize and Configure VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.Buffer.html Demonstrates how to instantiate a buffer from a ByteBuffer and configure its fields like sType and shaderCoreBuiltins. This is essential for passing feature flags to the Vulkan API. ```java import org.lwjgl.vulkan.VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM; import java.nio.ByteBuffer; // Create a buffer from an existing ByteBuffer VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.Buffer buffer = new VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM.Buffer(container); // Configure the buffer fields buffer.sType$Default(); buffer.pNext(0L); buffer.shaderCoreBuiltins(true); ``` -------------------------------- ### Instantiate VkCommandBufferBeginInfo.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkCommandBufferBeginInfo.Buffer.html Demonstrates how to create a new buffer instance for VkCommandBufferBeginInfo, either by specifying a memory address and capacity or by wrapping an existing ByteBuffer. ```java // Creating a buffer from a memory address and capacity VkCommandBufferBeginInfo.Buffer buffer = new VkCommandBufferBeginInfo.Buffer(address, capacity); // Creating a buffer from an existing ByteBuffer VkCommandBufferBeginInfo.Buffer bufferFromBuffer = new VkCommandBufferBeginInfo.Buffer(byteBuffer); ``` -------------------------------- ### Get Display Bounds Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDLVideo.html Retrieves the bounding rectangle of a display, which defines its position and size within the virtual desktop. This is useful for multi-monitor setups. ```Java static boolean nSDL_GetDisplayBounds(int displayID, long rect) ``` ```C bool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect * rect) ``` -------------------------------- ### Get LLVM Entry Basic Block Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/LLVMCore.html Retrieves the entry basic block of an LLVM function. This is the starting point for function execution in LLVM IR. ```c LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn) ``` -------------------------------- ### Initialize VkDeviceFaultVendorInfoEXT.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkDeviceFaultVendorInfoEXT.Buffer.html Demonstrates how to instantiate a buffer for vendor fault information using an existing ByteBuffer container. ```Java import org.lwjgl.vulkan.VkDeviceFaultVendorInfoEXT; import java.nio.ByteBuffer; // Create a buffer backed by a ByteBuffer VkDeviceFaultVendorInfoEXT.Buffer buffer = new VkDeviceFaultVendorInfoEXT.Buffer(container); ``` -------------------------------- ### Get Definition Spelling and Extent (C) Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.html Retrieves the spelling and extent (start and end line/column) of a definition. This function is part of the Clang C API. ```c void clang_getDefinitionSpellingAndExtent(CXCursor cursor, char const ** startBuf, char const ** endBuf, unsigned * startLine, unsigned * startColumn, unsigned * endLine, unsigned * endColumn) ``` -------------------------------- ### Struct Initialization and Copying in Java Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPipelineCreationFeedbackCreateInfo.html Demonstrates methods for initializing a VkPipelineCreationFeedbackCreateInfo struct with specific values or by copying data from another struct. The 'set' methods provide convenient ways to populate the struct. ```java public VkPipelineCreationFeedbackCreateInfo set(int sType, long pNext, VkPipelineCreationFeedback pPipelineCreationFeedback, @Nullable VkPipelineCreationFeedback.Buffer pPipelineStageCreationFeedbacks) public VkPipelineCreationFeedbackCreateInfo set(VkPipelineCreationFeedbackCreateInfo src) ``` -------------------------------- ### Initialize VkBufferDeviceAddressInfoKHR.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkBufferDeviceAddressInfoKHR.Buffer.html Demonstrates how to instantiate a buffer for VkBufferDeviceAddressInfoKHR using a ByteBuffer container. ```java import org.lwjgl.vulkan.VkBufferDeviceAddressInfoKHR; import java.nio.ByteBuffer; // Create a buffer instance backed by a ByteBuffer ByteBuffer container = ByteBuffer.allocateDirect(VkBufferDeviceAddressInfoKHR.SIZEOF); VkBufferDeviceAddressInfoKHR.Buffer buffer = new VkBufferDeviceAddressInfoKHR.Buffer(container); ``` -------------------------------- ### Get Source Range Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.html This function creates a CXSourceRange object given a starting and ending CXSourceLocation. It is used to define a specific segment of source code. ```c CXSourceRange clang_getRange(CXSourceLocation begin, CXSourceLocation end) ``` -------------------------------- ### Get Driver Information Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Retrieves information about the current audio driver, including name, GUID, and system rate. Used to query hardware capabilities. ```Java (JNI) nFMOD_System_GetDriverInfo(long system, int id, long name, int namelen, long guid, long systemrate, long speakermode, long speakermodechannels); ``` ```C FMOD_RESULT FMOD_System_GetDriverInfo(FMOD_SYSTEM * system, int id, char * name, int namelen, FMOD_GUID * guid, int * systemrate, FMOD_SPEAKERMODE * speakermode, int * speakermodechannels); ``` -------------------------------- ### Initialize VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.Buffer.html Demonstrates how to instantiate the buffer using a ByteBuffer container, which links the native memory of the buffer to the Java-managed memory. ```java import org.lwjgl.vulkan.VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM; import java.nio.ByteBuffer; // Assuming 'container' is a valid ByteBuffer containing struct data VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.Buffer buffer = new VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM.Buffer(container); ``` -------------------------------- ### VkPhysicalDeviceSchedulingControlsPropertiesARM Initialization and Copy Methods (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceSchedulingControlsPropertiesARM.html Illustrates methods for initializing a VkPhysicalDeviceSchedulingControlsPropertiesARM struct with specific values or copying data from another struct instance. Includes a default setter for sType. ```java public VkPhysicalDeviceSchedulingControlsPropertiesARM sType$Default() { sType(VK11.VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM); return this; } public VkPhysicalDeviceSchedulingControlsPropertiesARM set(int sType, long pNext) { nsType(address(), sType); npNext(address(), pNext); return this; } public VkPhysicalDeviceSchedulingControlsPropertiesARM set(VkPhysicalDeviceSchedulingControlsPropertiesARM src) { memCopy(src.address(), address(),SIZEOF); return this; } ``` -------------------------------- ### Get Loop Points - FMOD C API Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Retrieves the start and end points for looping an FMOD sound on its channel, along with the time units for these points. ```c FMOD_RESULT FMOD_Channel_GetLoopPoints(FMOD_CHANNEL * channel, unsigned int * loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int * loopend, FMOD_TIMEUNIT loopendtype) ``` -------------------------------- ### Initialize and Configure VkFenceGetWin32HandleInfoKHR.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkFenceGetWin32HandleInfoKHR.Buffer.html Demonstrates how to instantiate a buffer backed by a ByteBuffer and configure its fields. This is typically used when preparing Vulkan structures for native calls. ```java import org.lwjgl.vulkan.VkFenceGetWin32HandleInfoKHR; import java.nio.ByteBuffer; // Create a buffer from an existing ByteBuffer VkFenceGetWin32HandleInfoKHR.Buffer buffer = new VkFenceGetWin32HandleInfoKHR.Buffer(container); // Configure fields buffer.sType$Default(); buffer.fence(fenceHandle); buffer.handleType(handleTypeFlag); ``` -------------------------------- ### Get Root Sample from Sample Tree (C) Source: https://javadoc.lwjgl.org/index-files/index-18.html Retrieves the root sample from a given rmtSampleTree. This function is essential for starting the traversal of the profiling data structure. ```c rmtSample * rmt_SampleTreeGetRootSample(rmtSampleTree * sample_tree) ``` -------------------------------- ### Struct Initialization and Copying (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR.html Demonstrates how to initialize a VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR struct with specific values or by copying data from another struct. These methods are essential for setting up struct instances before use. ```Java public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR set(int sType, long pNext) public VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR set(VkPhysicalDeviceComputeShaderDerivativesPropertiesKHR src) ``` -------------------------------- ### Get Display Information (SDL) Source: https://javadoc.lwjgl.org/org/lwjgl/sdl/SDLVideo.html Retrieves an array of display identifiers available on the system. This method is essential for multi-monitor setups or querying information about each connected display. ```Java @NativeType("SDL_DisplayID *") public static @Nullable IntBuffer SDL_GetDisplays(); public static long nSDL_GetDisplays(long count); ``` ```C SDL_DisplayID * SDL_GetDisplays(int * count); ``` -------------------------------- ### Instantiate VkPhysicalDeviceMeshShaderPropertiesNV.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceMeshShaderPropertiesNV.Buffer.html Demonstrates how to create a new buffer instance from a memory address or an existing ByteBuffer container. ```java // Create from a memory address and capacity VkPhysicalDeviceMeshShaderPropertiesNV.Buffer buffer = new VkPhysicalDeviceMeshShaderPropertiesNV.Buffer(address, capacity); // Create from an existing ByteBuffer ByteBuffer container = ByteBuffer.allocateDirect(size); VkPhysicalDeviceMeshShaderPropertiesNV.Buffer bufferFromContainer = new VkPhysicalDeviceMeshShaderPropertiesNV.Buffer(container); ``` -------------------------------- ### Get Default Mix Matrix - FMOD API Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Obtains the default mixing matrix used for routing audio between speakers. This is essential for complex audio setups. ```c FMOD_RESULT FMOD_System_GetDefaultMixMatrix(FMOD_SYSTEM * system, FMOD_SPEAKERMODE sourcespeakermode, FMOD_SPEAKERMODE targetspeakermode, float * matrix, int matrixhop) static int ``` ```java FMOD_System_GetDefaultMixMatrix(long system, int sourcespeakermode, int targetspeakermode, FloatBuffer matrix, int matrixhop) ``` -------------------------------- ### NkKeyboard Method Implementations (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/nuklear/NkKeyboard.html Provides Java code examples for NkKeyboard methods. This includes methods for getting the struct size, accessing key buffers and individual keys, retrieving text input buffers and individual characters, and getting the length of the text input. ```java public int sizeof() { // Returns sizeof(struct). // Specified by: sizeof in class Struct return 0; // Placeholder } @NativeType("struct nk_key[NK_KEY_MAX]") public NkKey.Buffer keys() { // Returns a NkKey.Buffer view of the keys field. return null; // Placeholder } @NativeType("struct nk_key") public NkKey keys(int index) { // Returns a NkKey view of the struct at the specified index of the keys field. return null; // Placeholder } @NativeType("char[NK_INPUT_MAX]") public ByteBuffer text() { // Returns a ByteBuffer view of the text field. return null; // Placeholder } @NativeType("char") public byte text(int index) { // Returns the value at the specified index of the text field. return 0; // Placeholder } public int text_len() { // Returns the value of the text_len field. return 0; // Placeholder } ``` -------------------------------- ### Initialize VkMicromapBuildInfoEXT.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkMicromapBuildInfoEXT.Buffer.html Demonstrates how to instantiate a buffer for VkMicromapBuildInfoEXT structs using a memory address or a ByteBuffer container. ```java // Create a new buffer instance from a raw memory address VkMicromapBuildInfoEXT.Buffer buffer = new VkMicromapBuildInfoEXT.Buffer(address, capacity); // Create a new buffer instance backed by a ByteBuffer VkMicromapBuildInfoEXT.Buffer bufferFromBuffer = new VkMicromapBuildInfoEXT.Buffer(byteBuffer); ``` -------------------------------- ### Get Delay from ChannelGroup (C/JNI) Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Retrieves the delay information (start and end DSP clock) for a channel group. This function is available in both C and as a JNI wrapper for Java. ```c FMOD_RESULT FMOD_ChannelGroup_GetDelay(FMOD_CHANNELGROUP * channelgroup, unsigned long long * dspclock_start, unsigned long long * dspclock_end, FMOD_BOOL * stopchannels); static int nFMOD_ChannelGroup_GetDelay(long channelgroup, long dspclock_start, long dspclock_end, long stopchannels); ``` -------------------------------- ### VkImportFenceWin32HandleInfoKHR Initialization and Copy Methods (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkImportFenceWin32HandleInfoKHR.html Shows methods for initializing a VkImportFenceWin32HandleInfoKHR struct with multiple values at once or by copying from another struct instance. Includes the `set` method overloads. ```java public VkImportFenceWin32HandleInfoKHR set(int sType, long pNext, long fence, int flags, int handleType, long handle, ByteBuffer name) { // Initializes this struct with the specified values. return this; } public VkImportFenceWin32HandleInfoKHR set(VkImportFenceWin32HandleInfoKHR src) { // Copies the specified struct data to this struct. // Parameters: src - the source struct // Returns: this struct return this; } ``` -------------------------------- ### Create VkRayTracingPipelineCreateInfoKHR Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkRayTracingPipelineCreateInfoKHR.html Demonstrates various methods for creating instances of VkRayTracingPipelineCreateInfoKHR. This includes creation from a ByteBuffer, using memory allocation utilities like memCalloc and memAlloc, and direct memory address creation. Safe versions are also provided to handle null addresses. ```java import java.nio.ByteBuffer; import org.lwjgl.system.MemoryStack; import org.lwjgl.vulkan.VkRayTracingPipelineCreateInfoKHR; // Create from ByteBuffer ByteBuffer container = ...; VkRayTracingPipelineCreateInfoKHR instance1 = new VkRayTracingPipelineCreateInfoKHR(container); // Create using memCalloc VkRayTracingPipelineCreateInfoKHR instance2 = VkRayTracingPipelineCreateInfoKHR.calloc(); VkRayTracingPipelineCreateInfoKHR.Buffer buffer1 = VkRayTracingPipelineCreateInfoKHR.calloc(10); // Create using MemoryStack try (MemoryStack stack = MemoryStack.stackPush()) { VkRayTracingPipelineCreateInfoKHR instance3 = VkRayTracingPipelineCreateInfoKHR.calloc(stack); VkRayTracingPipelineCreateInfoKHR.Buffer buffer2 = VkRayTracingPipelineCreateInfoKHR.calloc(10, stack); } // Create using BufferUtils VkRayTracingPipelineCreateInfoKHR instance4 = VkRayTracingPipelineCreateInfoKHR.create(); VkRayTracingPipelineCreateInfoKHR.Buffer buffer3 = VkRayTracingPipelineCreateInfoKHR.create(10); // Create from address long address = ...; VkRayTracingPipelineCreateInfoKHR instance5 = VkRayTracingPipelineCreateInfoKHR.create(address); VkRayTracingPipelineCreateInfoKHR.Buffer buffer4 = VkRayTracingPipelineCreateInfoKHR.create(address, 10); // Safe creation from address VkRayTracingPipelineCreateInfoKHR safeInstance = VkRayTracingPipelineCreateInfoKHR.createSafe(address); VkRayTracingPipelineCreateInfoKHR.Buffer safeBuffer = VkRayTracingPipelineCreateInfoKHR.createSafe(address, 10); ``` -------------------------------- ### Get Cursor Extent Address (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/ClangIndex.Functions.html Retrieves the memory address for the `getCursorExtent` function. This function returns the source code extent (start and end locations) of a cursor. ```java public static final long getCursorExtent ``` -------------------------------- ### Get Stride of BGFX Vertex Layout Source: https://javadoc.lwjgl.org/org/lwjgl/bgfx/BGFX.html Returns the stride (total size in bytes) of a single vertex in the BGFX vertex layout. This is the distance between the start of consecutive vertices. ```c uint16_t bgfx_vertex_layout_get_stride(bgfx_vertex_layout_t const * _this) ``` -------------------------------- ### Configure VkDeviceCreateInfo.Buffer Fields Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkDeviceCreateInfo.Buffer.html Demonstrates how to set configuration fields such as flags and pNext pointers. The pNext methods allow for chaining various Vulkan extension structures to the device creation process. ```java buffer.flags(0); buffer.pNext(address); buffer.pNext(vkDeviceMemoryReportCreateInfoEXTInstance); ``` -------------------------------- ### Create VkVertexInputBindingDescription2EXT Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkVertexInputBindingDescription2EXT.html Demonstrates how to create a new VkVertexInputBindingDescription2EXT instance using different memory allocation methods like memAlloc, memCalloc, and BufferUtils. It also shows how to create an instance from a given memory address. ```java public static VkVertexInputBindingDescription2EXT malloc() { // Returns a new VkVertexInputBindingDescription2EXT instance allocated with memAlloc. // The instance must be explicitly freed. return null; } public static VkVertexInputBindingDescription2EXT calloc() { // Returns a new VkVertexInputBindingDescription2EXT instance allocated with memCalloc. // The instance must be explicitly freed. return null; } public static VkVertexInputBindingDescription2EXT create() { // Returns a new VkVertexInputBindingDescription2EXT instance allocated with BufferUtils. return null; } public static VkVertexInputBindingDescription2EXT create(long address) { // Returns a new VkVertexInputBindingDescription2EXT instance for the specified memory address. return null; } public static @Nullable VkVertexInputBindingDescription2EXT createSafe(long address) { // Like create, but returns null if address is NULL. return null; } ``` -------------------------------- ### Configure Multicast Viewport Arrays (OpenGL/Java) Source: https://javadoc.lwjgl.org/org/lwjgl/opengl/NVXGpuMulticast2.html Sets the viewport parameters for a specific GPU in a multicast setup. It takes a starting index and an array of floating-point values defining the viewports. ```Java public static void glMulticastViewportArrayvNVX(int gpu, int first, float[] v); ``` -------------------------------- ### Get Next Use of LLVM Use (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/llvm/LLVMCore.html Retrieves the next use (LLVMUseRef) in a linked list of uses, starting from a given LLVMUseRef. Used for iterating through all uses of a value. ```Java @NativeType("LLVMUseRef") public static long LLVMGetNextUse(@NativeType("LLVMUseRef") long U) `LLVMUseRef LLVMGetNextUse(LLVMUseRef U)` ``` -------------------------------- ### Instantiate VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer.html Demonstrates how to initialize a buffer instance using a memory address and capacity, or a backing ByteBuffer. ```java // Initialize with address and capacity VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer buffer = new VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer(address, capacity); // Initialize with a ByteBuffer container VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer bufferFromBuffer = new VkVideoEncodeAV1QualityLevelPropertiesKHR.Buffer(byteBuffer); ``` -------------------------------- ### Instantiate VkPhysicalDeviceMaintenance5Properties Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkPhysicalDeviceMaintenance5Properties.html Demonstrates how to create an instance of the struct using a ByteBuffer or memory allocation methods. ```Java public VkPhysicalDeviceMaintenance5Properties(ByteBuffer container); public static VkPhysicalDeviceMaintenance5Properties malloc(); public static VkPhysicalDeviceMaintenance5Properties calloc(); public static VkPhysicalDeviceMaintenance5Properties create(); ``` -------------------------------- ### Get Delay - FMOD C API Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Retrieves the delay in DSP clock ticks for the start and end of playback on an FMOD channel, and whether this delay affects stopped channels. ```c FMOD_RESULT FMOD_Channel_GetDelay(FMOD_CHANNEL * channel, unsigned long long * dspclock_start, unsigned long long * dspclock_end, FMOD_BOOL * stopchannels) ``` -------------------------------- ### Initialize and Configure Struct Instance Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkAccelerationStructureCaptureDescriptorDataInfoEXT.html Demonstrates how to instantiate the struct using a ByteBuffer and configure its fields using setter methods. ```java ByteBuffer buffer = ByteBuffer.allocateDirect(SIZEOF); VkAccelerationStructureCaptureDescriptorDataInfoEXT info = new VkAccelerationStructureCaptureDescriptorDataInfoEXT(buffer); info.sType(VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT) .pNext(0) .accelerationStructure(handle); ``` -------------------------------- ### Get Driver Info - FMOD API Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMOD.html Retrieves detailed information about a specific audio driver, including its name, GUID, sample rate, speaker mode, and channel count. ```c FMOD_RESULT FMOD_System_GetDriverInfo(FMOD_SYSTEM * system, int id, char * name, int namelen, FMOD_GUID * guid, int * systemrate, FMOD_SPEAKERMODE * speakermode, int * speakermodechannels) static int ``` ```java FMOD_System_GetDriverInfo(long system, int id, ByteBuffer name, FMOD_GUID guid, IntBuffer systemrate, IntBuffer speakermode, IntBuffer speakermodechannels) ``` -------------------------------- ### Get VCA ID (C/C++) Source: https://javadoc.lwjgl.org/org/lwjgl/fmod/FMODStudio.html Retrieves the unique ID (GUID) of a VCA (Voltage Controlled Amplifier) in the FMOD Studio system. This function is accessible via C and C++. ```c static int nFMOD_Studio_VCA_GetID(long vca, long id) ``` ```cpp FMOD_RESULT FMOD_Studio_VCA_GetID(FMOD_STUDIO_VCA * vca, FMOD_GUID * id) ``` -------------------------------- ### Initialize VkCudaLaunchInfoNV.Buffer Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkCudaLaunchInfoNV.Buffer.html Demonstrates how to instantiate a buffer for VkCudaLaunchInfoNV structures using a memory address and capacity or a ByteBuffer container. ```java // Create a buffer from an existing ByteBuffer ByteBuffer container = ByteBuffer.allocateDirect(size); VkCudaLaunchInfoNV.Buffer buffer = new VkCudaLaunchInfoNV.Buffer(container); // Create a buffer from a raw memory address VkCudaLaunchInfoNV.Buffer directBuffer = new VkCudaLaunchInfoNV.Buffer(address, capacity); ``` -------------------------------- ### VkCopyBufferToImageInfo2KHR Initialization and Copy Methods (Java) Source: https://javadoc.lwjgl.org/org/lwjgl/vulkan/VkCopyBufferToImageInfo2KHR.html Illustrates methods for initializing a VkCopyBufferToImageInfo2KHR instance with multiple values at once or by copying data from another instance. The 'set' methods provide convenient ways to populate the structure. ```java public VkCopyBufferToImageInfo2KHR set(int sType, long pNext, long srcBuffer, long dstImage, int dstImageLayout, VkBufferImageCopy2.Buffer pRegions) public VkCopyBufferToImageInfo2KHR set(VkCopyBufferToImageInfo2KHR src) ```