org.lwjgl.opengl.GL46 Maven / Gradle / Ivy
Show all versions of lwjgl-opengl Show documentation
/*
* 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 core OpenGL 4.6 functionality. OpenGL 4.6 implementations support revision 4.60 of the OpenGL Shading Language.
*
* Extensions promoted to core in this release:
*
*
* - ARB_indirect_parameters
* - ARB_pipeline_statistics_query
* - ARB_polygon_offset_clamp
* - KHR_no_error
* - ARB_shader_atomic_counter_ops
* - ARB_shader_draw_parameters
* - ARB_shader_group_vote
* - ARB_gl_spirv
* - ARB_spirv_extensions
* - ARB_texture_filter_anisotropic
* - ARB_transform_feedback_overflow_query
*
*/
public class GL46 {
/**
* 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 GL15#glBeginQuery BeginQuery}, {@link GL15#glEndQuery EndQuery}, {@link GL15#glGetQueryiv GetQueryiv},
* {@link GL40#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40#glEndQueryIndexed EndQueryIndexed} and {@link GL40#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 GL41#glShaderBinary ShaderBinary}. */
public static final int GL_SHADER_BINARY_FORMAT_SPIR_V = 0x9551;
/** Accepted by the {@code pname} parameter of {@link GL20#glGetShaderiv GetShaderiv}. */
public static final int GL_SPIR_V_BINARY = 0x9552;
/** Accepted by the {@code name} parameter of {@link GL30#glGetStringi GetStringi}. */
public static final int GL_SPIR_V_EXTENSIONS = 0x9553;
/** Accepted by the {@code pname} parameter of {@link GL11#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 GL15#glBeginQuery BeginQuery}, {@link GL15#glEndQuery EndQuery}, {@link GL15#glGetQueryiv GetQueryiv},
* {@link GL40#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40#glEndQueryIndexed EndQueryIndexed} and {@link GL40#glGetQueryIndexediv GetQueryIndexediv}.
*/
public static final int
GL_TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC,
GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED;
static { GL.initialize(); }
protected GL46() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLCapabilities caps) {
return checkFunctions(
caps.glMultiDrawArraysIndirectCount, caps.glMultiDrawElementsIndirectCount, caps.glPolygonOffsetClamp, caps.glSpecializeShader
);
}
// --- [ 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 GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("const void *") 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 GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("const void *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) {
nglMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride);
}
/**
*
*
* Behaves similarly to {@link GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("const void *") 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 GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("const void *") 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 GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("const void *") 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 GL43#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_POLYGON POLYGON} {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP} {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN} {@link GL11#GL_TRIANGLES TRIANGLES} {@link GL11#GL_QUAD_STRIP QUAD_STRIP} {@link GL11#GL_QUADS QUADS} {@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 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 glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("const void *") 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 GL11#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 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 GL41#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 GL41#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 glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("const GLchar *") ByteBuffer pEntryPoint, @NativeType("const GLuint *") IntBuffer pConstantIndex, @NativeType("const GLuint *") IntBuffer pConstantValue) {
if (CHECKS) {
checkNT1(pEntryPoint);
check(pConstantValue, pConstantIndex.remaining());
}
nglSpecializeShader(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 GL41#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 GL41#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 glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("const GLchar *") CharSequence pEntryPoint, @NativeType("const GLuint *") IntBuffer pConstantIndex, @NativeType("const GLuint *") IntBuffer pConstantValue) {
if (CHECKS) {
check(pConstantValue, pConstantIndex.remaining());
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer pEntryPointEncoded = stack.UTF8(pEntryPoint);
nglSpecializeShader(shader, memAddress(pEntryPointEncoded), pConstantIndex.remaining(), memAddress(pConstantIndex), memAddress(pConstantValue));
} finally {
stack.setPointer(stackPointer);
}
}
/**
*
*
* Array version of: {@link #glMultiDrawArraysIndirectCount MultiDrawArraysIndirectCount}
*/
public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("const void *") 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(__functionAddress, mode, indirect, drawcount, maxdrawcount, stride);
}
/**
*
*
* Array version of: {@link #glMultiDrawElementsIndirectCount MultiDrawElementsIndirectCount}
*/
public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("const void *") 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(__functionAddress, mode, type, indirect, drawcount, maxdrawcount, stride);
}
/**
*
*
* Array version of: {@link #glSpecializeShader SpecializeShader}
*/
public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("const GLchar *") ByteBuffer pEntryPoint, @NativeType("const GLuint *") int[] pConstantIndex, @NativeType("const GLuint *") int[] pConstantValue) {
long __functionAddress = GL.getICD().glSpecializeShader;
if (CHECKS) {
check(__functionAddress);
checkNT1(pEntryPoint);
check(pConstantValue, pConstantIndex.length);
}
callPPPV(__functionAddress, shader, memAddress(pEntryPoint), pConstantIndex.length, pConstantIndex, pConstantValue);
}
/**
*
*
* Array version of: {@link #glSpecializeShader SpecializeShader}
*/
public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("const GLchar *") CharSequence pEntryPoint, @NativeType("const GLuint *") int[] pConstantIndex, @NativeType("const GLuint *") int[] pConstantValue) {
long __functionAddress = GL.getICD().glSpecializeShader;
if (CHECKS) {
check(__functionAddress);
check(pConstantValue, pConstantIndex.length);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer pEntryPointEncoded = stack.UTF8(pEntryPoint);
callPPPV(__functionAddress, shader, memAddress(pEntryPointEncoded), pConstantIndex.length, pConstantIndex, pConstantValue);
} finally {
stack.setPointer(stackPointer);
}
}
}