org.lwjgl.vulkan.EXTHdrMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-vulkan Show documentation
Show all versions of lwjgl-vulkan Show documentation
A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
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.*;
/**
* This extension defines two new structures and a function to assign SMPTE (the Society of Motion Picture and Television Engineers) 2086 metadata and CTA (Consumer Technology Association) 861.3 metadata to a swapchain. The metadata includes the color primaries, white point, and luminance range of the reference monitor, which all together define the color volume that contains all the possible colors the reference monitor can produce. The reference monitor is the display where creative work is done and creative intent is established. To preserve such creative intent as much as possible and achieve consistent color reproduction on different viewing displays, it is useful for the display pipeline to know the color volume of the original reference monitor where content was created or tuned. This avoids performing unnecessary mapping of colors that are not displayable on the original reference monitor. The metadata also includes the {@code maxContentLightLevel} and {@code maxFrameAverageLightLevel} as defined by CTA 861.3.
*
* While the general purpose of the metadata is to assist in the transformation between different color volumes of different displays and help achieve better color reproduction, it is not in the scope of this extension to define how exactly the metadata should be used in such a process. It is up to the implementation to determine how to make use of the metadata.
*
* VK_EXT_hdr_metadata
*
*
* - Name String
* - {@code VK_EXT_hdr_metadata}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 106
* - Revision
* - 2
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRSwapchain VK_KHR_swapchain}
*
* - Contact
*
* - Courtney Goeltzenleuchter courtney-g
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2018-12-19
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Courtney Goeltzenleuchter, Google
*
*
*/
public class EXTHdrMetadata {
/** The extension specification version. */
public static final int VK_EXT_HDR_METADATA_SPEC_VERSION = 2;
/** The extension name. */
public static final String VK_EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata";
/** Extends {@code VkStructureType}. */
public static final int VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000;
protected EXTHdrMetadata() {
throw new UnsupportedOperationException();
}
// --- [ vkSetHdrMetadataEXT ] ---
/**
* Unsafe version of: {@link #vkSetHdrMetadataEXT SetHdrMetadataEXT}
*
* @param swapchainCount the number of swapchains included in {@code pSwapchains}.
*/
public static void nvkSetHdrMetadataEXT(VkDevice device, int swapchainCount, long pSwapchains, long pMetadata) {
long __functionAddress = device.getCapabilities().vkSetHdrMetadataEXT;
if (CHECKS) {
check(__functionAddress);
}
callPPPV(device.address(), swapchainCount, pSwapchains, pMetadata, __functionAddress);
}
/**
* Set Hdr metadata.
*
* C Specification
*
*
* void vkSetHdrMetadataEXT(
* VkDevice device,
* uint32_t swapchainCount,
* const VkSwapchainKHR* pSwapchains,
* const VkHdrMetadataEXT* pMetadata);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pSwapchains} must be a valid pointer to an array of {@code swapchainCount} valid {@code VkSwapchainKHR} handles
* - {@code pMetadata} must be a valid pointer to an array of {@code swapchainCount} valid {@link VkHdrMetadataEXT} structures
* - {@code swapchainCount} must be greater than 0
* - Both of {@code device}, and the elements of {@code pSwapchains} must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* See Also
*
* {@link VkHdrMetadataEXT}
*
* @param device the logical device where the swapchain(s) were created.
* @param pSwapchains a pointer to an array of {@code swapchainCount} {@code VkSwapchainKHR} handles.
* @param pMetadata a pointer to an array of {@code swapchainCount} {@link VkHdrMetadataEXT} structures.
*/
public static void vkSetHdrMetadataEXT(VkDevice device, @NativeType("VkSwapchainKHR const *") LongBuffer pSwapchains, @NativeType("VkHdrMetadataEXT const *") VkHdrMetadataEXT.Buffer pMetadata) {
if (CHECKS) {
check(pMetadata, pSwapchains.remaining());
}
nvkSetHdrMetadataEXT(device, pSwapchains.remaining(), memAddress(pSwapchains), pMetadata.address());
}
/** Array version of: {@link #vkSetHdrMetadataEXT SetHdrMetadataEXT} */
public static void vkSetHdrMetadataEXT(VkDevice device, @NativeType("VkSwapchainKHR const *") long[] pSwapchains, @NativeType("VkHdrMetadataEXT const *") VkHdrMetadataEXT.Buffer pMetadata) {
long __functionAddress = device.getCapabilities().vkSetHdrMetadataEXT;
if (CHECKS) {
check(__functionAddress);
check(pMetadata, pSwapchains.length);
}
callPPPV(device.address(), pSwapchains.length, pSwapchains, pMetadata.address(), __functionAddress);
}
}