Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.opengl;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to the ARB_indirect_parameters extension.
*
*
OpenGL 4.3 (with the introduction of the {@link ARBMultiDrawIndirect ARB_multi_draw_indirect} extension) enhanced the ability of OpenGL to allow a large sets of parameters
* for indirect draws (introduced with OpenGL 4.0) into a buffer object and dispatch the entire list with one API call. This allows, for example, a shader
* (such as a compute shader via shader storage buffers, or a geometry shader via transform feedback) to produce lists of draw commands that can then be
* consumed by OpenGL without a server-client round trip. However, when a variable and potentially unknown number of draws are produced by such a shader,
* it becomes difficult to know how many draws are in the output array(s). Applications must resort to techniques such as transform feedback primitive
* queries, or mapping buffers containing the content of atomic counters, which can cause stalls or bubbles in the OpenGL pipeline.
*
*
This extension introduces the concept of the "parameter buffer", which is a target allowing buffers to store parameters for certain drawing commands.
* Also in this extension, new variants of {@link GL43#glMultiDrawArraysIndirect MultiDrawArraysIndirect} and {@link GL43#glMultiDrawElementsIndirect MultiDrawElementsIndirect} are introduced that source some of their
* parameters from this buffer. Further commands could potentially be introduced that source other parameters from a buffer.
*
*
Requires {@link GL42 OpenGL 4.2}.
*/
public class ARBIndirectParameters {
/**
* Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv,
* MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData.
*/
public static final int GL_PARAMETER_BUFFER_ARB = 0x80EE;
/** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */
public static final int GL_PARAMETER_BUFFER_BINDING_ARB = 0x80EF;
static { GL.initialize(); }
protected ARBIndirectParameters() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(GLCapabilities caps) {
return checkFunctions(
caps.glMultiDrawArraysIndirectCountARB, caps.glMultiDrawElementsIndirectCountARB
);
}
// --- [ glMultiDrawArraysIndirectCountARB ] ---
/** Unsafe version of: {@link #glMultiDrawArraysIndirectCountARB MultiDrawArraysIndirectCountARB} */
public static native void nglMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride);
/**
* Behaves similarly to {@link GL43#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the
* {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of:
* @param indirect an array of structures containing the draw parameters
* @param drawcount the offset into the parameter buffer object
* @param maxdrawcount the maximum number of draws
* @param stride the distance in basic machine units between elements of the draw parameter array
*/
public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("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));
}
nglMultiDrawArraysIndirectCountARB(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_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of:
* @param indirect an array of structures containing the draw parameters
* @param drawcount the offset into the parameter buffer object
* @param maxdrawcount the maximum number of draws
* @param stride the distance in basic machine units between elements of the draw parameter array
*/
public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("const void *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) {
nglMultiDrawArraysIndirectCountARB(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_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of:
* @param indirect an array of structures containing the draw parameters
* @param drawcount the offset into the parameter buffer object
* @param maxdrawcount the maximum number of draws
* @param stride the distance in basic machine units between elements of the draw parameter array
*/
public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("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);
}
nglMultiDrawArraysIndirectCountARB(mode, memAddress(indirect), drawcount, maxdrawcount, stride);
}
// --- [ glMultiDrawElementsIndirectCountARB ] ---
/** Unsafe version of: {@link #glMultiDrawElementsIndirectCountARB MultiDrawElementsIndirectCountARB} */
public static native void nglMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride);
/**
* Behaves similarly to {@link GL43#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the
* {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of:
* @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}
{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}
{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
* @param indirect a structure containing an array of draw parameters
* @param drawcount the offset into the parameter buffer object
* @param maxdrawcount the maximum number of draws
* @param stride the distance in basic machine units between elements of the draw parameter array
*/
public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("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));
}
nglMultiDrawElementsIndirectCountARB(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_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of:
* @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}
{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}
{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
* @param indirect a structure containing an array of draw parameters
* @param drawcount the offset into the parameter buffer object
* @param maxdrawcount the maximum number of draws
* @param stride the distance in basic machine units between elements of the draw parameter array
*/
public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("const void *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) {
nglMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride);
}
/**
* Behaves similarly to {@link GL43#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the
* {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies
* the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than
* {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four.
*
* @param mode what kind of primitives to render. One of: