org.lwjgl.vulkan.EXTLineRasterization 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 org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
/**
* This extension adds some line rasterization features that are commonly used in CAD applications and supported in other APIs like OpenGL. Bresenham-style line rasterization is supported, smooth rectangular lines (coverage to alpha) are supported, and stippled lines are supported for all three line rasterization modes.
*
* VK_EXT_line_rasterization
*
*
* - Name String
* - {@code VK_EXT_line_rasterization}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 260
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRGetPhysicalDeviceProperties2 VK_KHR_get_physical_device_properties2}
*
* - Special Use
*
* - CAD support
*
* - Contact
*
* - Jeff Bolz jeffbolznv
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2019-05-09
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Jeff Bolz, NVIDIA
* - Allen Jensen, NVIDIA
* - Jason Ekstrand, Intel
*
*
*/
public class EXTLineRasterization {
/** The extension specification version. */
public static final int VK_EXT_LINE_RASTERIZATION_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT}
* - {@link #VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT}
*
*/
public static final int
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000,
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002;
/** Extends {@code VkDynamicState}. */
public static final int VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = 1000259000;
/**
* VkLineRasterizationModeEXT - Line rasterization modes
*
* Description
*
*
* - {@link #VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT LINE_RASTERIZATION_MODE_DEFAULT_EXT} is equivalent to {@link #VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT LINE_RASTERIZATION_MODE_RECTANGULAR_EXT} if {@link VkPhysicalDeviceLimits}{@code ::strictLines} is {@link VK10#VK_TRUE TRUE}, otherwise lines are drawn as non-{@code strictLines} parallelograms. Both of these modes are defined in Basic Line Segment Rasterization.
* - {@link #VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT LINE_RASTERIZATION_MODE_RECTANGULAR_EXT} specifies lines drawn as if they were rectangles extruded from the line
* - {@link #VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT LINE_RASTERIZATION_MODE_BRESENHAM_EXT} specifies lines drawn by determining which pixel diamonds the line intersects and exits, as defined in Bresenham Line Segment Rasterization.
* - {@link #VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT} specifies lines drawn if they were rectangles extruded from the line, with alpha falloff, as defined in Smooth Lines.
*
*
* See Also
*
* {@link VkPipelineRasterizationLineStateCreateInfoEXT}
*/
public static final int
VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0,
VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1,
VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2,
VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3;
protected EXTLineRasterization() {
throw new UnsupportedOperationException();
}
// --- [ vkCmdSetLineStippleEXT ] ---
/**
* Set line stipple dynamically for a command buffer.
*
* C Specification
*
* To dynamically set the line stipple state, call:
*
*
* void vkCmdSetLineStippleEXT(
* VkCommandBuffer commandBuffer,
* uint32_t lineStippleFactor,
* uint16_t lineStipplePattern);
*
* Description
*
* This command sets the line stipple state for subsequent drawing commands when the graphics pipeline is created with {@link #VK_DYNAMIC_STATE_LINE_STIPPLE_EXT DYNAMIC_STATE_LINE_STIPPLE_EXT} set in {@link VkPipelineDynamicStateCreateInfo}{@code ::pDynamicStates}. Otherwise, this state is specified by the {@link VkPipelineRasterizationLineStateCreateInfoEXT}{@code ::lineStippleFactor} and {@link VkPipelineRasterizationLineStateCreateInfoEXT}{@code ::lineStipplePattern} values used to create the currently active pipeline.
*
* Valid Usage
*
*
* - {@code lineStippleFactor} must be in the range
[1,256]
*
*
* Valid Usage (Implicit)
*
*
* - {@code commandBuffer} must be a valid {@code VkCommandBuffer} handle
* - {@code commandBuffer} must be in the recording state
* - The {@code VkCommandPool} that {@code commandBuffer} was allocated from must support graphics operations
*
*
* Host Synchronization
*
*
* - Host access to {@code commandBuffer} must be externally synchronized
* - Host access to the {@code VkCommandPool} that {@code commandBuffer} was allocated from must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types
* Primary Secondary Both Graphics
*
*
* @param commandBuffer the command buffer into which the command will be recorded.
* @param lineStippleFactor the repeat factor used in stippled line rasterization.
* @param lineStipplePattern the bit pattern used in stippled line rasterization.
*/
public static void vkCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, @NativeType("uint32_t") int lineStippleFactor, @NativeType("uint16_t") short lineStipplePattern) {
long __functionAddress = commandBuffer.getCapabilities().vkCmdSetLineStippleEXT;
if (CHECKS) {
check(__functionAddress);
}
callPV(commandBuffer.address(), lineStippleFactor, lineStipplePattern, __functionAddress);
}
}