org.lwjgl.opengl.ARBCopyBuffer 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 org.lwjgl.system.*;
/**
* Native bindings to the ARB_copy_buffer extension.
*
* This extension provides a mechanism to do an accelerated copy from one buffer object to another. This may be useful to load buffer objects in a "loading
* thread" while minimizing cost and synchronization effort in the "rendering thread."
*
* Promoted to core in {@link GL31 OpenGL 3.1}.
*/
public class ARBCopyBuffer {
static { GL.initialize(); }
/**
* Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange,
* FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData.
*/
public static final int
GL_COPY_READ_BUFFER = 0x8F36,
GL_COPY_WRITE_BUFFER = 0x8F37;
protected ARBCopyBuffer() {
throw new UnsupportedOperationException();
}
// --- [ glCopyBufferSubData ] ---
/**
* Copies all or part of one buffer object's data store to the data store of another buffer object.
*
* An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object
* bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.
*
* An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size)
* and [writeoffset, writeoffset+size) overlap.
*
* An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if zero is bound to readtarget or writetarget.
*
* An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if the buffer objects bound to either readtarget or writetarget are mapped.
*
* @param readTarget the source buffer object target. One of:
{@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} {@link GL31C#GL_COPY_READ_BUFFER COPY_READ_BUFFER} {@link GL31C#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER} {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} {@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER} {@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER} {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER} {@link GL31C#GL_TEXTURE_BUFFER TEXTURE_BUFFER} {@link GL31C#GL_UNIFORM_BUFFER UNIFORM_BUFFER}
* @param writeTarget the destination buffer object target
* @param readOffset the source buffer object offset, in bytes
* @param writeOffset the destination buffer object offset, in bytes
* @param size the number of bytes to copy
*/
public static void glCopyBufferSubData(@NativeType("GLenum") int readTarget, @NativeType("GLenum") int writeTarget, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) {
GL31C.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
}
}