Added support for single primitive input/output parameters.
This commit is contained in:
parent
e97e601894
commit
94a4c50a83
|
@ -33,45 +33,41 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.BufferUtils;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
/** @author spasi */
|
||||
final class StringUtils {
|
||||
final class APIUtils {
|
||||
|
||||
private static final int INITIAL_BUFFER_SIZE = 256;
|
||||
private static final int INITIAL_LENGTHS_SIZE = 4;
|
||||
|
||||
private static final int BUFFERS_SIZE = 32;
|
||||
|
||||
private static final ThreadLocal arrayTL = new ThreadLocal() {
|
||||
protected Object initialValue() {
|
||||
return new char[INITIAL_BUFFER_SIZE];
|
||||
}
|
||||
protected Object initialValue() { return new char[INITIAL_BUFFER_SIZE]; }
|
||||
};
|
||||
|
||||
private static final ThreadLocal bufferTL = new ThreadLocal() {
|
||||
protected Object initialValue() {
|
||||
return BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE);
|
||||
}
|
||||
protected Object initialValue() { return BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE); }
|
||||
};
|
||||
|
||||
private static final ThreadLocal lengthsTL = new ThreadLocal() {
|
||||
protected Object initialValue() {
|
||||
return BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE);
|
||||
}
|
||||
protected Object initialValue() { return BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE); }
|
||||
};
|
||||
|
||||
private static final ThreadLocal infiniteSeqTL = new ThreadLocal() {
|
||||
protected Object initialValue() {
|
||||
return new InfiniteCharSequence();
|
||||
}
|
||||
protected Object initialValue() { return new InfiniteCharSequence(); }
|
||||
};
|
||||
|
||||
private static final ThreadLocal buffersTL = new ThreadLocal() {
|
||||
protected Object initialValue() { return new Buffers(); }
|
||||
};
|
||||
|
||||
private static CharsetEncoder encoder = Charset.forName("US-ASCII").newEncoder();
|
||||
|
||||
private StringUtils() {
|
||||
private APIUtils() {
|
||||
}
|
||||
|
||||
private static char[] getArray(final int size) {
|
||||
|
@ -89,7 +85,7 @@ final class StringUtils {
|
|||
return array;
|
||||
}
|
||||
|
||||
static ByteBuffer getBuffer(final int size) {
|
||||
static ByteBuffer getBufferByte(final int size) {
|
||||
ByteBuffer buffer = (ByteBuffer)bufferTL.get();
|
||||
|
||||
if ( buffer.capacity() < size ) {
|
||||
|
@ -99,13 +95,13 @@ final class StringUtils {
|
|||
|
||||
buffer = BufferUtils.createByteBuffer(size);
|
||||
bufferTL.set(buffer);
|
||||
}
|
||||
} else
|
||||
buffer.clear();
|
||||
|
||||
buffer.clear();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private static ByteBuffer getBufferOffset(final int size) {
|
||||
private static ByteBuffer getBufferByteOffset(final int size) {
|
||||
ByteBuffer buffer = (ByteBuffer)bufferTL.get();
|
||||
|
||||
if ( buffer.capacity() < size ) {
|
||||
|
@ -124,6 +120,20 @@ final class StringUtils {
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static ShortBuffer getBufferShort() { return ((Buffers)buffersTL.get()).shorts; }
|
||||
|
||||
static IntBuffer getBufferInt() { return ((Buffers)buffersTL.get()).ints; }
|
||||
|
||||
static LongBuffer getBufferLong() { return ((Buffers)buffersTL.get()).longs; }
|
||||
|
||||
static FloatBuffer getBufferFloat() { return ((Buffers)buffersTL.get()).floats; }
|
||||
|
||||
static DoubleBuffer getBufferDouble() { return ((Buffers)buffersTL.get()).doubles; }
|
||||
|
||||
static IntBuffer getLengths() {
|
||||
return getLengths(1);
|
||||
}
|
||||
|
||||
static IntBuffer getLengths(final int size) {
|
||||
IntBuffer lengths = (IntBuffer)lengthsTL.get();
|
||||
|
||||
|
@ -134,16 +144,22 @@ final class StringUtils {
|
|||
|
||||
lengths = BufferUtils.createIntBuffer(size);
|
||||
lengthsTL.set(lengths);
|
||||
}
|
||||
} else
|
||||
lengths.clear();
|
||||
|
||||
lengths.clear();
|
||||
return lengths;
|
||||
}
|
||||
|
||||
static InfiniteCharSequence getInfiniteSeq() {
|
||||
private static InfiniteCharSequence getInfiniteSeq() {
|
||||
return (InfiniteCharSequence)infiniteSeqTL.get();
|
||||
}
|
||||
|
||||
private static void encode(final ByteBuffer buffer, final CharSequence string) {
|
||||
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
|
||||
infiniteSeq.setString(string);
|
||||
encoder.encode(infiniteSeq.buffer, buffer, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a byte string from the specified buffer.
|
||||
*
|
||||
|
@ -161,12 +177,6 @@ final class StringUtils {
|
|||
return new String(charArray, 0, length);
|
||||
}
|
||||
|
||||
private static void encode(final ByteBuffer buffer, final CharSequence string) {
|
||||
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
|
||||
infiniteSeq.setString(string);
|
||||
encoder.encode(infiniteSeq.buffer, buffer, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a buffer containing the specified string as bytes.
|
||||
*
|
||||
|
@ -175,7 +185,7 @@ final class StringUtils {
|
|||
* @return the String as a ByteBuffer
|
||||
*/
|
||||
static ByteBuffer getBuffer(final CharSequence string) {
|
||||
final ByteBuffer buffer = getBuffer(string.length());
|
||||
final ByteBuffer buffer = getBufferByte(string.length());
|
||||
|
||||
encode(buffer, string);
|
||||
|
||||
|
@ -190,8 +200,8 @@ final class StringUtils {
|
|||
*
|
||||
* @return the String as a ByteBuffer
|
||||
*/
|
||||
static ByteBuffer getBufferOffset(final CharSequence string, final int offset) {
|
||||
final ByteBuffer buffer = getBufferOffset(offset + string.length());
|
||||
static ByteBuffer getBuffer(final CharSequence string, final int offset) {
|
||||
final ByteBuffer buffer = getBufferByteOffset(offset + string.length());
|
||||
|
||||
encode(buffer, string);
|
||||
|
||||
|
@ -207,7 +217,7 @@ final class StringUtils {
|
|||
* @return the String as a ByteBuffer
|
||||
*/
|
||||
static ByteBuffer getBufferNT(final CharSequence string) {
|
||||
final ByteBuffer buffer = getBuffer(string.length() + 1);
|
||||
final ByteBuffer buffer = getBufferByte(string.length() + 1);
|
||||
|
||||
encode(buffer, string);
|
||||
|
||||
|
@ -216,7 +226,7 @@ final class StringUtils {
|
|||
return buffer;
|
||||
}
|
||||
|
||||
private static int getTotalLength(final CharSequence[] strings) {
|
||||
static int getTotalLength(final CharSequence[] strings) {
|
||||
int length = 0;
|
||||
for ( int i = 0; i < strings.length; i++ )
|
||||
length += strings[i].length();
|
||||
|
@ -232,7 +242,7 @@ final class StringUtils {
|
|||
* @return the Strings as a ByteBuffer
|
||||
*/
|
||||
static ByteBuffer getBuffer(final CharSequence[] strings) {
|
||||
final ByteBuffer buffer = getBuffer(getTotalLength(strings));
|
||||
final ByteBuffer buffer = getBufferByte(getTotalLength(strings));
|
||||
|
||||
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
|
||||
for ( int i = 0; i < strings.length; i++ ) {
|
||||
|
@ -253,7 +263,7 @@ final class StringUtils {
|
|||
* @return the Strings as a ByteBuffer
|
||||
*/
|
||||
static ByteBuffer getBufferNT(final CharSequence[] strings) {
|
||||
final ByteBuffer buffer = getBuffer(getTotalLength(strings) + strings.length);
|
||||
final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length);
|
||||
|
||||
final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
|
||||
for ( int i = 0; i < strings.length; i++ ) {
|
||||
|
@ -321,4 +331,24 @@ final class StringUtils {
|
|||
}
|
||||
}
|
||||
|
||||
private static class Buffers {
|
||||
|
||||
final ShortBuffer shorts;
|
||||
final IntBuffer ints;
|
||||
final LongBuffer longs;
|
||||
|
||||
final FloatBuffer floats;
|
||||
final DoubleBuffer doubles;
|
||||
|
||||
Buffers() {
|
||||
shorts = BufferUtils.createShortBuffer(BUFFERS_SIZE);
|
||||
ints = BufferUtils.createIntBuffer(BUFFERS_SIZE);
|
||||
longs = BufferUtils.createLongBuffer(BUFFERS_SIZE);
|
||||
|
||||
floats = BufferUtils.createFloatBuffer(BUFFERS_SIZE);
|
||||
doubles = BufferUtils.createDoubleBuffer(BUFFERS_SIZE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -31,17 +31,13 @@
|
|||
*/
|
||||
package org.lwjgl.test.opengl;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @author spasi <spasi@users.sourceforge.net>
|
||||
*/
|
||||
/** @author spasi <spasi@users.sourceforge.net> */
|
||||
public final class SyncTest {
|
||||
|
||||
private SyncTest() {
|
||||
|
@ -131,9 +127,7 @@ public final class SyncTest {
|
|||
System.out.println("Unexpected wait status: 0x" + Integer.toHexString(status));
|
||||
}
|
||||
|
||||
IntBuffer property = BufferUtils.createIntBuffer(1);
|
||||
GL32.glGetSync(sync, GL32.GL_SYNC_STATUS, null, property);
|
||||
System.out.println("Sync Status: " + (property.get(0) == GL32.GL_UNSIGNALED ? "UNSIGNALED" : "SIGNALED"));
|
||||
System.out.println("Sync Status: " + (GL32.glGetSync(sync, GL32.GL_SYNC_STATUS) == GL32.GL_UNSIGNALED ? "UNSIGNALED" : "SIGNALED"));
|
||||
|
||||
GL32.glDeleteSync(sync);
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ package org.lwjgl.test.opengl;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
@ -191,9 +190,7 @@ public final class VBOTest {
|
|||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
}
|
||||
IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
ARBBufferObject.glGenBuffersARB(int_buffer);
|
||||
buffer_id = int_buffer.get(0);
|
||||
buffer_id = ARBBufferObject.glGenBuffersARB();
|
||||
ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id);
|
||||
vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
||||
vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50);
|
||||
|
@ -206,9 +203,7 @@ public final class VBOTest {
|
|||
* Cleanup
|
||||
*/
|
||||
private static void cleanup() {
|
||||
IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
int_buffer.put(0, buffer_id);
|
||||
ARBBufferObject.glDeleteBuffersARB(int_buffer);
|
||||
ARBBufferObject.glDeleteBuffersARB(buffer_id);
|
||||
Display.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,21 +37,18 @@
|
|||
*/
|
||||
package org.lwjgl.test.opengl.shaders;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.ARBProgram;
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
abstract class Shader {
|
||||
|
||||
private static final IntBuffer int_buffer = BufferUtils.createIntBuffer(16);
|
||||
protected static IntBuffer programBuffer = BufferUtils.createIntBuffer(1);
|
||||
protected static ByteBuffer fileBuffer = BufferUtils.createByteBuffer(1024 * 10);
|
||||
|
||||
protected Shader() {
|
||||
|
@ -61,18 +58,6 @@ abstract class Shader {
|
|||
|
||||
abstract void cleanup();
|
||||
|
||||
/**
|
||||
* Obtain a GL integer value from the driver
|
||||
*
|
||||
* @param gl_enum The GL value you want
|
||||
*
|
||||
* @return the integer value
|
||||
*/
|
||||
public static int glGetInteger(int gl_enum) {
|
||||
GL11.glGetInteger(gl_enum, int_buffer);
|
||||
return int_buffer.get(0);
|
||||
}
|
||||
|
||||
protected static String getShaderText(String file) {
|
||||
String shader = null;
|
||||
|
||||
|
@ -107,7 +92,7 @@ abstract class Shader {
|
|||
|
||||
protected static void checkProgramError(String programFile, String programSource) {
|
||||
if ( GL11.glGetError() == GL11.GL_INVALID_OPERATION ) {
|
||||
final int errorPos = glGetInteger(ARBProgram.GL_PROGRAM_ERROR_POSITION_ARB);
|
||||
final int errorPos = GL11.glGetInteger(ARBProgram.GL_PROGRAM_ERROR_POSITION_ARB);
|
||||
int lineStart = 0;
|
||||
int lineEnd = -1;
|
||||
for ( int i = 0; i < programSource.length(); i++ ) {
|
||||
|
@ -140,9 +125,7 @@ abstract class Shader {
|
|||
}
|
||||
|
||||
protected static void printShaderObjectInfoLog(String file, int ID) {
|
||||
ARBShaderObjects.glGetObjectParameterARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, programBuffer);
|
||||
|
||||
final int logLength = programBuffer.get(0);
|
||||
final int logLength = ARBShaderObjects.glGetObjectParameteriARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB);
|
||||
if ( logLength <= 1 )
|
||||
return;
|
||||
|
||||
|
@ -153,9 +136,7 @@ abstract class Shader {
|
|||
}
|
||||
|
||||
protected static void printShaderProgramInfoLog(int ID) {
|
||||
ARBShaderObjects.glGetObjectParameterARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, programBuffer);
|
||||
|
||||
final int logLength = programBuffer.get(0);
|
||||
final int logLength = ARBShaderObjects.glGetObjectParameteriARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB);
|
||||
if ( logLength <= 1 )
|
||||
return;
|
||||
|
||||
|
|
|
@ -60,9 +60,7 @@ final class ShaderFP extends Shader {
|
|||
vpFile = vpShaderFile;
|
||||
vpSource = getShaderText(vpShaderFile);
|
||||
|
||||
ARBProgram.glGenProgramsARB(programBuffer);
|
||||
|
||||
vpID = programBuffer.get(0);
|
||||
vpID = ARBProgram.glGenProgramsARB();
|
||||
|
||||
ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID);
|
||||
ARBProgram.glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, vpSource);
|
||||
|
@ -73,9 +71,7 @@ final class ShaderFP extends Shader {
|
|||
fpFile = fpShaderFile;
|
||||
fpSource = getShaderText(fpShaderFile);
|
||||
|
||||
ARBProgram.glGenProgramsARB(programBuffer);
|
||||
|
||||
fpID = programBuffer.get(0);
|
||||
fpID = ARBProgram.glGenProgramsARB();
|
||||
|
||||
ARBProgram.glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID);
|
||||
ARBProgram.glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, fpSource);
|
||||
|
@ -104,11 +100,8 @@ final class ShaderFP extends Shader {
|
|||
}
|
||||
|
||||
void cleanup() {
|
||||
programBuffer.put(0, vpID);
|
||||
ARBProgram.glDeleteProgramsARB(programBuffer);
|
||||
|
||||
programBuffer.put(0, fpID);
|
||||
ARBProgram.glDeleteProgramsARB(programBuffer);
|
||||
ARBProgram.glDeleteProgramsARB(vpID);
|
||||
ARBProgram.glDeleteProgramsARB(fpID);
|
||||
}
|
||||
|
||||
}
|
|
@ -70,8 +70,7 @@ final class ShaderFSH extends Shader {
|
|||
|
||||
printShaderObjectInfoLog(this.vshFile, vshID);
|
||||
|
||||
ARBShaderObjects.glGetObjectParameterARB(vshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( ARBShaderObjects.glGetObjectParameteriARB(vshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A compilation error occured in a vertex shader.");
|
||||
|
||||
// Initialize the fragment shader.
|
||||
|
@ -84,8 +83,7 @@ final class ShaderFSH extends Shader {
|
|||
|
||||
printShaderObjectInfoLog(this.fshFile, fshID);
|
||||
|
||||
ARBShaderObjects.glGetObjectParameterARB(fshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( ARBShaderObjects.glGetObjectParameteriARB(fshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A compilation error occured in a fragment shader.");
|
||||
|
||||
// Initialize the shader program.
|
||||
|
@ -98,8 +96,7 @@ final class ShaderFSH extends Shader {
|
|||
|
||||
printShaderProgramInfoLog(programID);
|
||||
|
||||
ARBShaderObjects.glGetObjectParameterARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( ARBShaderObjects.glGetObjectParameteriARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A linking error occured in a shader program.");
|
||||
|
||||
uniformLocation = getUniformLocation(programID, "UNIFORMS");
|
||||
|
|
|
@ -70,8 +70,7 @@ final class ShaderUNI extends Shader {
|
|||
|
||||
printShaderObjectInfoLog(file, shaderID);
|
||||
|
||||
GL20.glGetShader(shaderID, GL20.GL_COMPILE_STATUS, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( GL20.glGetShader(shaderID, GL20.GL_COMPILE_STATUS) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A compilation error occured in a vertex shader.");
|
||||
|
||||
programID = GL20.glCreateProgram();
|
||||
|
@ -81,27 +80,19 @@ final class ShaderUNI extends Shader {
|
|||
|
||||
printShaderProgramInfoLog(programID);
|
||||
|
||||
GL20.glGetProgram(programID, GL20.GL_LINK_STATUS, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( GL20.glGetProgram(programID, GL20.GL_LINK_STATUS) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A linking error occured in a shader program.");
|
||||
|
||||
final String[] uniformNames = { "uniformA", "uniformB" };
|
||||
|
||||
IntBuffer indexes = BufferUtils.createIntBuffer(uniformNames.length);
|
||||
IntBuffer params = BufferUtils.createIntBuffer(uniformNames.length);
|
||||
IntBuffer getBuffer = BufferUtils.createIntBuffer(16);
|
||||
IntBuffer buffers = BufferUtils.createIntBuffer(1);
|
||||
|
||||
// Get uniform block index and data size
|
||||
final int blockIndex = ARBUniformBufferObject.glGetUniformBlockIndex(programID, "test");
|
||||
ARBUniformBufferObject.glGetActiveUniformBlock(programID, blockIndex, ARBUniformBufferObject.GL_UNIFORM_BLOCK_DATA_SIZE, getBuffer);
|
||||
final int blockSize = getBuffer.get(0);
|
||||
final int blockSize = ARBUniformBufferObject.glGetActiveUniformBlock(programID, blockIndex, ARBUniformBufferObject.GL_UNIFORM_BLOCK_DATA_SIZE);
|
||||
|
||||
System.out.println("blockSize = " + blockSize);
|
||||
|
||||
// Create uniform buffer object and allocate a ByteBuffer
|
||||
GL15.glGenBuffers(buffers);
|
||||
bufferID = buffers.get(0);
|
||||
bufferID = GL15.glGenBuffers();
|
||||
GL15.glBindBuffer(ARBUniformBufferObject.GL_UNIFORM_BUFFER, bufferID);
|
||||
GL15.glBufferData(ARBUniformBufferObject.GL_UNIFORM_BUFFER, blockSize, GL15.GL_DYNAMIC_DRAW);
|
||||
buffer = BufferUtils.createFloatBuffer(blockSize);
|
||||
|
@ -111,6 +102,9 @@ final class ShaderUNI extends Shader {
|
|||
ARBUniformBufferObject.glUniformBlockBinding(programID, blockIndex, 0);
|
||||
|
||||
// Get uniform information
|
||||
IntBuffer indexes = BufferUtils.createIntBuffer(uniformNames.length);
|
||||
IntBuffer params = BufferUtils.createIntBuffer(uniformNames.length);
|
||||
|
||||
ARBUniformBufferObject.glGetUniformIndices(programID, uniformNames, indexes);
|
||||
uniformA_index = indexes.get(0);
|
||||
uniformB_index = indexes.get(1);
|
||||
|
|
|
@ -53,9 +53,7 @@ final class ShaderVP extends Shader {
|
|||
file = shaderFile;
|
||||
source = getShaderText(shaderFile);
|
||||
|
||||
ARBProgram.glGenProgramsARB(programBuffer);
|
||||
|
||||
ID = programBuffer.get(0);
|
||||
ID = ARBProgram.glGenProgramsARB();
|
||||
|
||||
ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ID);
|
||||
ARBProgram.glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, source);
|
||||
|
@ -76,8 +74,7 @@ final class ShaderVP extends Shader {
|
|||
}
|
||||
|
||||
void cleanup() {
|
||||
programBuffer.put(0, ID);
|
||||
ARBProgram.glDeleteProgramsARB(programBuffer);
|
||||
ARBProgram.glDeleteProgramsARB(ID);
|
||||
}
|
||||
|
||||
}
|
|
@ -38,8 +38,6 @@
|
|||
|
||||
package org.lwjgl.test.opengl.shaders;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
import org.lwjgl.opengl.ARBVertexShader;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -64,8 +62,7 @@ final class ShaderVSH extends Shader {
|
|||
|
||||
printShaderObjectInfoLog(file, shaderID);
|
||||
|
||||
ARBShaderObjects.glGetObjectParameterARB(shaderID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( ARBShaderObjects.glGetObjectParameteriARB(shaderID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A compilation error occured in a vertex shader.");
|
||||
|
||||
programID = ARBShaderObjects.glCreateProgramObjectARB();
|
||||
|
@ -75,8 +72,7 @@ final class ShaderVSH extends Shader {
|
|||
|
||||
printShaderProgramInfoLog(programID);
|
||||
|
||||
ARBShaderObjects.glGetObjectParameterARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB, programBuffer);
|
||||
if ( programBuffer.get(0) == GL11.GL_FALSE )
|
||||
if ( ARBShaderObjects.glGetObjectParameteriARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE )
|
||||
ShadersTest.kill("A linking error occured in a shader program.");
|
||||
|
||||
uniformLocation = getUniformLocation(programID, "UNIFORMS");
|
||||
|
|
|
@ -44,4 +44,6 @@ import java.lang.annotation.ElementType;
|
|||
@Target(ElementType.PARAMETER)
|
||||
public @interface Constant {
|
||||
String value();
|
||||
/** If true, the original parameter will not be removed from the method. */
|
||||
boolean keepParam() default false;
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ public class GLTypeMap implements TypeMap {
|
|||
else if ( type.equals(boolean.class) )
|
||||
return new Class[] { GLboolean.class };
|
||||
else if ( type.equals(void.class) )
|
||||
return new Class[] { GLvoid.class, GLstring.class };
|
||||
return new Class[] { GLvoid.class, GLreturn.class };
|
||||
else
|
||||
return new Class[] { };
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ public class GLTypeMap implements TypeMap {
|
|||
else if ( PointerWrapper.class.isAssignableFrom(type) )
|
||||
valid_types = new Class[] { GLpointer.class };
|
||||
else if (void.class.equals(type) )
|
||||
valid_types = new Class[] { GLstring.class };
|
||||
valid_types = new Class[] { GLreturn.class };
|
||||
else
|
||||
valid_types = new Class[] { };
|
||||
return valid_types;
|
||||
|
|
|
@ -32,19 +32,24 @@
|
|||
package org.lwjgl.util.generator;
|
||||
|
||||
/**
|
||||
* Methods annotated with @GLstring will return a String instead of void.
|
||||
* When a method is annonated with @GLreturn, the specified output Buffer parameter
|
||||
* will be used to return a single value. The primitive type will match the Buffer type.
|
||||
* String will be returned if the Buffer is a ByteBuffer annotated with @GLchar.
|
||||
*
|
||||
* @author spasi
|
||||
*/
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@NativeType
|
||||
@Target({ ElementType.METHOD })
|
||||
public @interface GLstring {
|
||||
/** The ByteBuffer argument that will be used to retrieve the String bytes. */
|
||||
String string();
|
||||
/** The argument that specifies the maximum number of bytes that may be read. */
|
||||
String maxLength();
|
||||
public @interface GLreturn {
|
||||
/** The Buffer parameter to use as the method result. */
|
||||
String value();
|
||||
/** The argument that specifies the maximum number of bytes that may be read (String results only). */
|
||||
String maxLength() default "";
|
||||
/** If true, the maxLength value is going to be used when creating the String. */
|
||||
boolean forceMaxLength() default false;
|
||||
///** If we use the byte buffer for another parameter, an offset must be used. */
|
||||
//String offset() default "";
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2008 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of 'LWJGL' nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.lwjgl.util.generator;
|
||||
|
||||
/**
|
||||
* This annotation must be used when there are more than one CharSequence arguments in a method.
|
||||
* TODO: Add support for CharSequence[] if/when we need it.
|
||||
*
|
||||
* @author spasi
|
||||
*/
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ ElementType.PARAMETER })
|
||||
public @interface GLstringOffset {
|
||||
/** An expression that will specify the offset from which this String will be written to the ByteBuffer. */
|
||||
String value();
|
||||
}
|
|
@ -105,17 +105,19 @@ public class GeneratorProcessorFactory implements AnnotationProcessorFactory, Ro
|
|||
}
|
||||
if (typemap_classname == null)
|
||||
throw new RuntimeException("No TypeMap class name specified with -Atypemap=<class-name>");
|
||||
|
||||
TypeDeclaration lastFile = null;
|
||||
try {
|
||||
TypeMap type_map = (TypeMap)(Class.forName(typemap_classname).newInstance());
|
||||
for (TypeDeclaration typedecl : env.getSpecifiedTypeDeclarations()) {
|
||||
lastFile = typedecl;
|
||||
typedecl.accept(getDeclarationScanner(new GeneratorVisitor(env, type_map, generate_error_checks, context_specific), NO_OP));
|
||||
}
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (InstantiationException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (Exception e) {
|
||||
if ( lastFile == null )
|
||||
throw new RuntimeException(e);
|
||||
else
|
||||
throw new RuntimeException("\n-- Failed to process template: " + lastFile.getQualifiedName() + " --", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
throw new RuntimeException("Method " + method.getSimpleName() + " throws checked exceptions");
|
||||
validateParameters(method);
|
||||
StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class);
|
||||
if (strip_annotation != null) {
|
||||
if (strip_annotation != null && method.getAnnotation(Alternate.class) == null) {
|
||||
String postfix_param_name = strip_annotation.value();
|
||||
ParameterDeclaration postfix_param = Utils.findParameter(method, postfix_param_name);
|
||||
if (Utils.isParameterMultiTyped(postfix_param))
|
||||
|
@ -142,9 +142,9 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
if (!found_auto_size_param
|
||||
&& param.getAnnotation(Result.class) == null
|
||||
&& param.getAnnotation(Constant.class) == null
|
||||
&& !Utils.isReturnString(method, param)
|
||||
&& !Utils.isReturnParameter(method, param)
|
||||
)
|
||||
throw new RuntimeException(param + " has no Check, Result nor Constant annotation and no other parameters has" +
|
||||
throw new RuntimeException(param + " has no Check, Result nor Constant annotation, is not the return parameter and no other parameter has" +
|
||||
" an @AutoSize annotation on it in method " + method);
|
||||
}
|
||||
if (param.getAnnotation(CachedReference.class) != null && param.getAnnotation(Result.class) != null)
|
||||
|
@ -249,10 +249,11 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
}
|
||||
|
||||
public void visitInterfaceDeclaration(InterfaceDeclaration d) {
|
||||
File input = d.getPosition().file();
|
||||
File output = new File(env.getOptions().get("-s") + '/' + d.getPackage().getQualifiedName().replace('.', '/'), Utils.getSimpleClassName(d) + ".java");
|
||||
|
||||
try {
|
||||
// Skip this class if the output exists and the input has not been modified.
|
||||
File input = d.getPosition().file();
|
||||
File output = new File(env.getOptions().get("-s") + '/' + d.getPackage().getQualifiedName().replace('.', '/'), Utils.getSimpleClassName(d) + ".java");
|
||||
if ( output.exists() && input.lastModified() < output.lastModified() )
|
||||
return;
|
||||
|
||||
|
@ -260,7 +261,14 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
generateJavaSource(d);
|
||||
if (d.getMethods().size() > 0)
|
||||
generateNativeSource(d);
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
// If anything goes wrong mid-gen, delete output to allow regen next time we run.
|
||||
if ( output.exists() )
|
||||
output.delete();
|
||||
} catch (Exception e2) {
|
||||
// ignore
|
||||
}
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ public class JavaMethodsGenerator {
|
|||
}
|
||||
} else if (
|
||||
param.getAnnotation(Result.class) == null
|
||||
&& (native_stub || (param.getAnnotation(Constant.class) == null && !Utils.isReturnString(method, param)))
|
||||
&& (native_stub || ((param.getAnnotation(Constant.class) == null || param.getAnnotation(Constant.class).keepParam()) && !Utils.isReturnParameter(method, param)))
|
||||
&& (getAutoTypeParameter(method, param) == null || mode != Mode.AUTOS)
|
||||
)
|
||||
{
|
||||
|
@ -237,12 +237,9 @@ public class JavaMethodsGenerator {
|
|||
if ( method.getAnnotation(GLpointer.class) != null )
|
||||
writer.print("new " + method.getReturnType() + "(");
|
||||
}
|
||||
GLstring string_annotation = method.getAnnotation(GLstring.class);
|
||||
if ( string_annotation != null ) {
|
||||
if ( method.getAnnotation(GLreturn.class) != null ) {
|
||||
has_result = true;
|
||||
writer.println("IntBuffer " + string_annotation.string() + "_length = StringUtils.getLengths(1);");
|
||||
writer.println("\t\tByteBuffer " + string_annotation.string() + " = StringUtils.getBuffer(" + string_annotation.maxLength() + ");");
|
||||
writer.print("\t\t");
|
||||
Utils.printGLReturnPre(writer, method, method.getAnnotation(GLreturn.class));
|
||||
}
|
||||
writer.print(Utils.getSimpleNativeMethodName(method, generate_error_checks, context_specific));
|
||||
if (mode == Mode.BUFFEROBJECT)
|
||||
|
@ -262,12 +259,10 @@ public class JavaMethodsGenerator {
|
|||
// DISABLED: indirect buffer support
|
||||
//printNondirectParameterCopies(writer, method, mode);
|
||||
if (has_result) {
|
||||
if ( string_annotation == null )
|
||||
if ( method.getAnnotation(GLreturn.class) == null )
|
||||
writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ";");
|
||||
else {
|
||||
writer.println("\t\t" + string_annotation.string() + ".limit(" + string_annotation.string() + "_length.get(0));");
|
||||
writer.println("\t\treturn StringUtils.getString(" + string_annotation.string() + ");");
|
||||
}
|
||||
else
|
||||
Utils.printGLReturnPost(writer, method, method.getAnnotation(GLreturn.class));
|
||||
}
|
||||
writer.println("\t}");
|
||||
}
|
||||
|
@ -403,22 +398,20 @@ public class JavaMethodsGenerator {
|
|||
if (mode == Mode.BUFFEROBJECT && param.getAnnotation(BufferObject.class) != null) {
|
||||
writer.print(param.getSimpleName() + Utils.BUFFER_OBJECT_PARAMETER_POSTFIX);
|
||||
} else {
|
||||
Class type = typeinfos_instance.get(param).getType();
|
||||
boolean hide_buffer = mode == Mode.AUTOS && getAutoTypeParameter(method, param) != null;
|
||||
if (hide_buffer)
|
||||
writer.print("null");
|
||||
else {
|
||||
Class type = typeinfos_instance.get(param).getType();
|
||||
if ( type == CharSequence.class || type == CharSequence[].class ) {
|
||||
GLstringOffset offset_annotation = param.getAnnotation(GLstringOffset.class);
|
||||
final String offset = Utils.getStringOffset(method, param);
|
||||
|
||||
writer.print("StringUtils.getBuffer");
|
||||
if ( offset_annotation != null )
|
||||
writer.print("Offset");
|
||||
writer.print("APIUtils.getBuffer");
|
||||
if ( param.getAnnotation(NullTerminated.class) != null )
|
||||
writer.print("NT");
|
||||
writer.print("(" + param.getSimpleName());
|
||||
if ( offset_annotation != null )
|
||||
writer.print(", " + offset_annotation.value());
|
||||
if ( offset != null )
|
||||
writer.print(", " + offset);
|
||||
writer.print(")");
|
||||
hide_buffer = true;
|
||||
} else
|
||||
|
@ -443,9 +436,10 @@ public class JavaMethodsGenerator {
|
|||
writer.print(" << " + shifting);
|
||||
if (check_annotation != null && check_annotation.canBeNull())
|
||||
writer.print(" : 0");
|
||||
} else if ( param.getAnnotation(GLstringOffset.class) != null )
|
||||
writer.print(param.getAnnotation(GLstringOffset.class).value());
|
||||
else
|
||||
} else if ( type == CharSequence.class || type == CharSequence[].class ) {
|
||||
final String offset = Utils.getStringOffset(method, param);
|
||||
writer.print(offset == null ? "0" : offset);
|
||||
} else
|
||||
writer.print("0");
|
||||
} else if ( param.getAnnotation(GLpointer.class) != null ) {
|
||||
writer.print(".getPointer()");
|
||||
|
@ -531,7 +525,7 @@ public class JavaMethodsGenerator {
|
|||
(mode != Mode.BUFFEROBJECT || param.getAnnotation(BufferObject.class) == null) &&
|
||||
(mode != Mode.AUTOS || getAutoTypeParameter(method, param) == null) &&
|
||||
param.getAnnotation(Result.class) == null &&
|
||||
!Utils.isReturnString(method, param) ) {
|
||||
!Utils.isReturnParameter(method, param) ) {
|
||||
String check_value = null;
|
||||
boolean can_be_null = false;
|
||||
Check check_annotation = param.getAnnotation(Check.class);
|
||||
|
@ -589,8 +583,8 @@ public class JavaMethodsGenerator {
|
|||
private static void printResultType(PrintWriter writer, MethodDeclaration method, boolean native_stub) {
|
||||
if ( native_stub && method.getAnnotation(GLpointer.class) != null )
|
||||
writer.print("long");
|
||||
else if ( !native_stub && method.getAnnotation(GLstring.class) != null )
|
||||
writer.print("String");
|
||||
else if ( !native_stub && method.getAnnotation(GLreturn.class) != null )
|
||||
writer.print(Utils.getMethodReturnType(method, method.getAnnotation(GLreturn.class), false));
|
||||
else
|
||||
writer.print(Utils.getMethodReturnType(method).toString());
|
||||
}
|
||||
|
|
|
@ -62,34 +62,31 @@ public class JavaTypeTranslator implements TypeVisitor {
|
|||
throw new RuntimeException(t + " is not allowed");
|
||||
}
|
||||
|
||||
public void visitPrimitiveType(PrimitiveType t) {
|
||||
switch (t.getKind()) {
|
||||
public static Class getPrimitiveClassFromKind(PrimitiveType.Kind kind) {
|
||||
switch ( kind ) {
|
||||
case LONG:
|
||||
type = long.class;
|
||||
break;
|
||||
return long.class;
|
||||
case INT:
|
||||
type = int.class;
|
||||
break;
|
||||
return int.class;
|
||||
case DOUBLE:
|
||||
type = double.class;
|
||||
break;
|
||||
return double.class;
|
||||
case FLOAT:
|
||||
type = float.class;
|
||||
break;
|
||||
return float.class;
|
||||
case SHORT:
|
||||
type = short.class;
|
||||
break;
|
||||
return short.class;
|
||||
case BYTE:
|
||||
type = byte.class;
|
||||
break;
|
||||
return byte.class;
|
||||
case BOOLEAN:
|
||||
type = boolean.class;
|
||||
break;
|
||||
return boolean.class;
|
||||
default:
|
||||
throw new RuntimeException(t.getKind() + " is not allowed");
|
||||
throw new RuntimeException(kind + " is not allowed");
|
||||
}
|
||||
}
|
||||
|
||||
public void visitPrimitiveType(PrimitiveType t) {
|
||||
type = getPrimitiveClassFromKind(t.getKind());
|
||||
}
|
||||
|
||||
public void visitDeclaredType(DeclaredType t) {
|
||||
throw new RuntimeException(t + " is not allowed");
|
||||
}
|
||||
|
|
|
@ -71,17 +71,17 @@ public class PostfixTranslator implements TypeVisitor {
|
|||
}
|
||||
|
||||
private static PrimitiveType.Kind getPrimitiveKindFromBufferClass(Class c) {
|
||||
if (IntBuffer.class.equals(c))
|
||||
if (IntBuffer.class.equals(c) || int.class.equals(c) )
|
||||
return PrimitiveType.Kind.INT;
|
||||
else if (DoubleBuffer.class.equals(c))
|
||||
else if (DoubleBuffer.class.equals(c) || double.class.equals(c) )
|
||||
return PrimitiveType.Kind.DOUBLE;
|
||||
else if (ShortBuffer.class.equals(c))
|
||||
else if (ShortBuffer.class.equals(c) || short.class.equals(c) )
|
||||
return PrimitiveType.Kind.SHORT;
|
||||
else if (ByteBuffer.class.equals(c))
|
||||
else if (ByteBuffer.class.equals(c) || byte.class.equals(c) )
|
||||
return PrimitiveType.Kind.BYTE;
|
||||
else if (FloatBuffer.class.equals(c))
|
||||
else if (FloatBuffer.class.equals(c) || float.class.equals(c))
|
||||
return PrimitiveType.Kind.FLOAT;
|
||||
else if (LongBuffer.class.equals(c))
|
||||
else if (LongBuffer.class.equals(c) || long.class.equals(c) )
|
||||
return PrimitiveType.Kind.LONG;
|
||||
else
|
||||
throw new RuntimeException(c + " is not allowed");
|
||||
|
@ -127,7 +127,7 @@ public class PostfixTranslator implements TypeVisitor {
|
|||
}
|
||||
|
||||
public void visitPrimitiveType(PrimitiveType t) {
|
||||
throw new RuntimeException(t + " is not allowed");
|
||||
visitPrimitiveTypeKind(t.getKind());
|
||||
}
|
||||
|
||||
private void visitPrimitiveTypeKind(PrimitiveType.Kind kind) {
|
||||
|
|
|
@ -40,15 +40,17 @@ package org.lwjgl.util.generator;
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
import com.sun.mirror.type.*;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.Buffer;
|
||||
import java.io.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
|
||||
import com.sun.mirror.declaration.*;
|
||||
import com.sun.mirror.type.PrimitiveType;
|
||||
import com.sun.mirror.type.TypeMirror;
|
||||
|
||||
public class Utils {
|
||||
|
||||
public static final String TYPEDEF_POSTFIX = "PROC";
|
||||
public static final String FUNCTION_POINTER_VAR_NAME = "function_pointer";
|
||||
public static final String FUNCTION_POINTER_POSTFIX = "_pointer";
|
||||
|
@ -209,6 +211,29 @@ public class Utils {
|
|||
return result_type;
|
||||
}
|
||||
|
||||
public static String getMethodReturnType(MethodDeclaration method, GLreturn return_annotation, boolean buffer) {
|
||||
ParameterDeclaration return_param = null;
|
||||
for ( ParameterDeclaration param : method.getParameters() ) {
|
||||
if ( param.getSimpleName().equals(return_annotation.value()) ) {
|
||||
return_param = param;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( return_param == null )
|
||||
throw new RuntimeException("The @GLreturn parameter \"" + return_annotation.value() + "\" could not be found in method: " + method);
|
||||
|
||||
PrimitiveType.Kind kind = NativeTypeTranslator.getPrimitiveKindFromBufferClass(Utils.getJavaType(return_param.getType()));
|
||||
if ( return_param.getAnnotation(GLboolean.class) != null )
|
||||
kind = PrimitiveType.Kind.BOOLEAN;
|
||||
|
||||
if ( kind == PrimitiveType.Kind.BYTE && (return_param.getAnnotation(GLchar.class) != null || return_param.getAnnotation(GLcharARB.class) != null) )
|
||||
return "String";
|
||||
else {
|
||||
final String type = JavaTypeTranslator.getPrimitiveClassFromKind(kind).getName();
|
||||
return buffer ? Character.toUpperCase(type.charAt(0)) + type.substring(1) : type;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean needResultSize(MethodDeclaration method) {
|
||||
return getNIOBufferType(getMethodReturnType(method)) != null && method.getAnnotation(AutoResultSize.class) == null;
|
||||
}
|
||||
|
@ -273,9 +298,98 @@ public class Utils {
|
|||
return method_name;
|
||||
}
|
||||
|
||||
static boolean isReturnString(MethodDeclaration method, ParameterDeclaration param) {
|
||||
GLstring string_annotation = method.getAnnotation(GLstring.class);
|
||||
return string_annotation != null && string_annotation.string().equals(param.getSimpleName());
|
||||
static boolean isReturnParameter(MethodDeclaration method, ParameterDeclaration param) {
|
||||
GLreturn string_annotation = method.getAnnotation(GLreturn.class);
|
||||
if ( string_annotation == null || !string_annotation.value().equals(param.getSimpleName()) )
|
||||
return false;
|
||||
|
||||
if ( param.getAnnotation(OutParameter.class) == null )
|
||||
throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method);
|
||||
|
||||
if ( param.getAnnotation(Check.class) != null )
|
||||
throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method);
|
||||
|
||||
if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 )
|
||||
throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static String getStringOffset(MethodDeclaration method, ParameterDeclaration param) {
|
||||
String offset = null;
|
||||
for ( ParameterDeclaration p : method.getParameters() ) {
|
||||
if ( param != null && p.getSimpleName().equals(param.getSimpleName()) )
|
||||
break;
|
||||
|
||||
final Class type = Utils.getJavaType(p.getType());
|
||||
if ( type.equals(CharSequence.class) ) {
|
||||
if ( offset == null )
|
||||
offset = p.getSimpleName() + ".length()";
|
||||
else
|
||||
offset += " + " + p.getSimpleName() + ".length()";
|
||||
if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1";
|
||||
|
||||
} else if ( type.equals(CharSequence[].class) ) {
|
||||
if ( offset == null )
|
||||
offset = "APIUtils.getTotalLength(" + p.getSimpleName() + ")";
|
||||
else
|
||||
offset += " + APIUtils.getTotalLength(" + p.getSimpleName() + ")";
|
||||
if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length";
|
||||
}
|
||||
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
static void printGLReturnPre(PrintWriter writer, MethodDeclaration method, GLreturn return_annotation) {
|
||||
final String return_type = getMethodReturnType(method, return_annotation, true);
|
||||
|
||||
if ( "String".equals(return_type) ) {
|
||||
if ( !return_annotation.forceMaxLength() ) {
|
||||
writer.println("IntBuffer " + return_annotation.value() + "_length = APIUtils.getLengths();");
|
||||
writer.print("\t\t");
|
||||
}
|
||||
writer.print("ByteBuffer " + return_annotation.value() + " = APIUtils.getBufferByte(" + return_annotation.maxLength());
|
||||
/*
|
||||
Params that use the return buffer will advance its position while filling it. When we return, the position will be
|
||||
at the right spot for grabbing the returned string bytes. We only have to make sure that the original buffer was
|
||||
large enough to hold everything, so that no re-allocations happen while filling.
|
||||
*/
|
||||
final String offset = getStringOffset(method, null);
|
||||
if ( offset != null )
|
||||
writer.print(" + " + offset);
|
||||
writer.println(");");
|
||||
} else {
|
||||
final String buffer_type = "Boolean".equals(return_type) ? "Byte" : return_type;
|
||||
writer.print(buffer_type + "Buffer " + return_annotation.value() + " = APIUtils.getBuffer" + buffer_type + "(");
|
||||
if ( "Byte".equals(buffer_type) )
|
||||
writer.print('1');
|
||||
writer.println(");");
|
||||
}
|
||||
|
||||
writer.print("\t\t");
|
||||
}
|
||||
|
||||
static void printGLReturnPost(PrintWriter writer, MethodDeclaration method, GLreturn return_annotation) {
|
||||
final String return_type = getMethodReturnType(method, return_annotation, true);
|
||||
|
||||
if ( "String".equals(return_type) ) {
|
||||
writer.print("\t\t" + return_annotation.value() + ".limit(");
|
||||
final String offset = getStringOffset(method, null);
|
||||
if ( offset != null)
|
||||
writer.print(offset + " + ");
|
||||
if ( return_annotation.forceMaxLength() )
|
||||
writer.print(return_annotation.maxLength());
|
||||
else
|
||||
writer.print(return_annotation.value() + "_length.get(0)");
|
||||
writer.println(");");
|
||||
writer.println("\t\treturn APIUtils.getString(" + return_annotation.value() + ");");
|
||||
} else {
|
||||
writer.print("\t\treturn " + return_annotation.value() + ".get(0)");
|
||||
if ( "Boolean".equals(return_type) )
|
||||
writer.print(" == 1");
|
||||
writer.println(";");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public interface AMD_performance_monitor {
|
|||
@OutParameter @GLchar ByteBuffer groupString);
|
||||
|
||||
@Alternate("glGetPerfMonitorGroupStringAMD")
|
||||
@GLstring(string = "groupString", maxLength = "bufSize")
|
||||
@GLreturn(value = "groupString", maxLength = "bufSize")
|
||||
void glGetPerfMonitorGroupStringAMD2(@GLuint int group, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("groupString_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer groupString);
|
||||
|
@ -82,7 +82,7 @@ public interface AMD_performance_monitor {
|
|||
@OutParameter @GLchar ByteBuffer counterString);
|
||||
|
||||
@Alternate("glGetPerfMonitorCounterStringAMD")
|
||||
@GLstring(string = "counterString", maxLength = "bufSize")
|
||||
@GLreturn(value = "counterString", maxLength = "bufSize")
|
||||
void glGetPerfMonitorCounterStringAMD2(@GLuint int group, @GLuint int counter, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("counterString_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer counterString);
|
||||
|
@ -91,16 +91,32 @@ public interface AMD_performance_monitor {
|
|||
|
||||
void glGenPerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors);
|
||||
|
||||
@Alternate("glGenPerfMonitorsAMD")
|
||||
@GLreturn("monitors")
|
||||
void glGenPerfMonitorsAMD2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors);
|
||||
|
||||
void glDeletePerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @GLuint IntBuffer monitors);
|
||||
|
||||
void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @AutoSize("counterList")int numCounters, @GLuint IntBuffer counterList);
|
||||
@Alternate("glDeletePerfMonitorsAMD")
|
||||
void glDeletePerfMonitorsAMD(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, monitor), 0", keepParam = true) int monitor);
|
||||
|
||||
void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @AutoSize("counterList") int numCounters, @GLuint IntBuffer counterList);
|
||||
|
||||
@Alternate("glSelectPerfMonitorCountersAMD")
|
||||
void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @Constant("1") int numCounters, @Constant(value = "APIUtils.getBufferInt().put(0, counter), 0", keepParam = true) int counter);
|
||||
|
||||
void glBeginPerfMonitorAMD(@GLuint int monitor);
|
||||
|
||||
void glEndPerfMonitorAMD(@GLuint int monitor);
|
||||
|
||||
void glGetPerfMonitorCounterDataAMD(@GLuint int monitor, @GLenum int pname,
|
||||
@AutoSize("data") @GLsizei int dataSize, @GLuint IntBuffer data,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) @GLint IntBuffer bytesWritten);
|
||||
void glGetPerfMonitorCounterDataAMD(@GLuint int monitor, @GLenum int pname, @AutoSize("data") @GLsizei int dataSize,
|
||||
@OutParameter @GLuint IntBuffer data,
|
||||
@OutParameter @GLint @Check(value = "1", canBeNull = true) IntBuffer bytesWritten);
|
||||
|
||||
@Alternate("glGetPerfMonitorCounterDataAMD")
|
||||
@GLreturn("data")
|
||||
void glGetPerfMonitorCounterDataAMD2(@GLuint int monitor, @GLenum int pname, @Constant("4") @GLsizei int dataSize,
|
||||
@OutParameter @GLuint IntBuffer data,
|
||||
@OutParameter @GLint @Constant("null, 0") IntBuffer bytesWritten);
|
||||
|
||||
}
|
|
@ -33,14 +33,14 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@Extension(postfix = "ARB", isFinal = false)
|
||||
public interface ARB_buffer_object {
|
||||
|
||||
/**
|
||||
* Accepted by the <usage> parameter of BufferDataARB:
|
||||
*/
|
||||
/** Accepted by the <usage> parameter of BufferDataARB: */
|
||||
int GL_STREAM_DRAW_ARB = 0x88E0;
|
||||
int GL_STREAM_READ_ARB = 0x88E1;
|
||||
int GL_STREAM_COPY_ARB = 0x88E2;
|
||||
|
@ -51,16 +51,12 @@ public interface ARB_buffer_object {
|
|||
int GL_DYNAMIC_READ_ARB = 0x88E9;
|
||||
int GL_DYNAMIC_COPY_ARB = 0x88EA;
|
||||
|
||||
/**
|
||||
* Accepted by the <access> parameter of MapBufferARB:
|
||||
*/
|
||||
/** Accepted by the <access> parameter of MapBufferARB: */
|
||||
int GL_READ_ONLY_ARB = 0x88B8;
|
||||
int GL_WRITE_ONLY_ARB = 0x88B9;
|
||||
int GL_READ_WRITE_ARB = 0x88BA;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetBufferParameterivARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetBufferParameterivARB: */
|
||||
int GL_BUFFER_SIZE_ARB = 0x8764;
|
||||
int GL_BUFFER_USAGE_ARB = 0x8765;
|
||||
int GL_BUFFER_ACCESS_ARB = 0x88BB;
|
||||
|
@ -72,7 +68,14 @@ public interface ARB_buffer_object {
|
|||
|
||||
void glDeleteBuffersARB(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
||||
|
||||
void glGenBuffersARB(@AutoSize("buffers") int n, @OutParameter @GLuint IntBuffer buffers);
|
||||
@Alternate("glDeleteBuffersARB")
|
||||
void glDeleteBuffersARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, buffer), 0", keepParam = true) int buffer);
|
||||
|
||||
void glGenBuffersARB(@AutoSize("buffers") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers);
|
||||
|
||||
@Alternate("glGenBuffersARB")
|
||||
@GLreturn("buffers")
|
||||
void glGenBuffersARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers);
|
||||
|
||||
boolean glIsBufferARB(@GLuint int buffer);
|
||||
|
||||
|
@ -121,8 +124,8 @@ public interface ARB_buffer_object {
|
|||
* Security warning: The length argument should match the buffer object size. Reading from or writing to outside
|
||||
* the memory region that corresponds to the mapped buffer object will cause native crashes.
|
||||
*
|
||||
* @param length the length of the mapped memory in bytes.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
* @param length the length of the mapped memory in bytes.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
*
|
||||
* @return A ByteBuffer representing the mapped buffer memory.
|
||||
*/
|
||||
|
@ -136,6 +139,11 @@ public interface ARB_buffer_object {
|
|||
@StripPostfix("params")
|
||||
void glGetBufferParameterivARB(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetBufferParameterivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetBufferParameterivARB2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("pointer")
|
||||
@AutoResultSize("GLChecks.getBufferObjectSizeARB(caps, target)")
|
||||
void glGetBufferPointervARB(@GLenum int target, @GLenum int pname, @Result @GLvoid ByteBuffer pointer);
|
||||
|
|
|
@ -60,4 +60,7 @@ public interface ARB_draw_buffers {
|
|||
int GL_DRAW_BUFFER15_ARB = 0x8834;
|
||||
|
||||
void glDrawBuffersARB(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers);
|
||||
|
||||
@Alternate("glDrawBuffersARB")
|
||||
void glDrawBuffersARB(@Constant("1") @GLsizei int size, @Constant(value = "APIUtils.getBufferInt().put(0, buffer), 0", keepParam = true) int buffer);
|
||||
}
|
||||
|
|
|
@ -190,8 +190,15 @@ public interface ARB_framebuffer_object {
|
|||
|
||||
void glDeleteRenderbuffers(@AutoSize("renderbuffers") @GLsizei int n, @Const @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glDeleteRenderbuffers")
|
||||
void glDeleteRenderbuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, renderbuffer), 0", keepParam = true) int renderbuffer);
|
||||
|
||||
void glGenRenderbuffers(@AutoSize("renderbuffers") @GLsizei int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glGenRenderbuffers")
|
||||
@GLreturn("renderbuffers")
|
||||
void glGenRenderbuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
void glRenderbufferStorage(@GLenum int target, @GLenum int internalformat,
|
||||
@GLsizei int width, @GLsizei int height);
|
||||
|
||||
|
@ -202,14 +209,26 @@ public interface ARB_framebuffer_object {
|
|||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetRenderbufferParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
boolean glIsFramebuffer(@GLuint int framebuffer);
|
||||
|
||||
void glBindFramebuffer(@GLenum int target, @GLuint int framebuffer);
|
||||
|
||||
void glDeleteFramebuffers(@AutoSize("framebuffers") @GLsizei int n, @Const @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glDeleteFramebuffers")
|
||||
void glDeleteFramebuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, framebuffer), 0", keepParam = true) int framebuffer);
|
||||
|
||||
void glGenFramebuffers(@AutoSize("framebuffers") @GLsizei int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glGenFramebuffers")
|
||||
@GLreturn("framebuffers")
|
||||
void glGenFramebuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@GLenum
|
||||
int glCheckFramebufferStatus(@GLenum int target);
|
||||
|
||||
|
@ -233,6 +252,12 @@ public interface ARB_framebuffer_object {
|
|||
void glGetFramebufferAttachmentParameteriv(@GLenum int target, @GLenum int attachment,
|
||||
@GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetFramebufferAttachmentParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetFramebufferAttachmentParameteriv2(@GLenum int target, @GLenum int attachment,
|
||||
@GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1,
|
||||
int dstX0, int dstY0, int dstX1, int dstY1,
|
||||
@GLbitfield int mask, @GLenum int filter);
|
||||
|
|
|
@ -33,7 +33,7 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public interface ARB_occlusion_query {
|
||||
|
||||
|
@ -43,9 +43,7 @@ public interface ARB_occlusion_query {
|
|||
*/
|
||||
int GL_SAMPLES_PASSED_ARB = 0x8914;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetQueryivARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetQueryivARB: */
|
||||
int GL_QUERY_COUNTER_BITS_ARB = 0x8864;
|
||||
int GL_CURRENT_QUERY_ARB = 0x8865;
|
||||
|
||||
|
@ -58,8 +56,15 @@ public interface ARB_occlusion_query {
|
|||
|
||||
void glGenQueriesARB(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glGenQueriesARB")
|
||||
@GLreturn("ids")
|
||||
void glGenQueriesARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
void glDeleteQueriesARB(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glDeleteQueriesARB")
|
||||
void glDeleteQueriesARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, id), 0", keepParam = true) int id);
|
||||
|
||||
boolean glIsQueryARB(@GLuint int id);
|
||||
|
||||
void glBeginQueryARB(@GLenum int target, @GLuint int id);
|
||||
|
@ -69,9 +74,24 @@ public interface ARB_occlusion_query {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryivARB(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryivARB2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectivARB(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetQueryObjectivARB2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectuivARB(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectuivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetQueryObjectuivARB2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
}
|
||||
|
|
|
@ -33,10 +33,7 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.DoubleBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.*;
|
||||
|
||||
@Extension(postfix = "ARB", isFinal = false)
|
||||
public interface ARB_program {
|
||||
|
@ -128,8 +125,15 @@ public interface ARB_program {
|
|||
|
||||
void glDeleteProgramsARB(@AutoSize("programs") @GLsizei int n, @Const @GLuint IntBuffer programs);
|
||||
|
||||
@Alternate("glDeleteProgramsARB")
|
||||
void glDeleteProgramsARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, program), 0", keepParam = true) int program);
|
||||
|
||||
void glGenProgramsARB(@AutoSize("programs") @GLsizei int n, @OutParameter @GLuint IntBuffer programs);
|
||||
|
||||
@Alternate("glGenProgramsARB")
|
||||
@GLreturn("programs")
|
||||
void glGenProgramsARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer programs);
|
||||
|
||||
void glProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w);
|
||||
|
||||
void glProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w);
|
||||
|
@ -165,7 +169,17 @@ public interface ARB_program {
|
|||
@StripPostfix("params")
|
||||
void glGetProgramivARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetProgramivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetProgramivARB2(@GLenum int target, @GLenum int parameterName, @OutParameter IntBuffer params);
|
||||
|
||||
void glGetProgramStringARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check @GLbyte Buffer paramString);
|
||||
|
||||
@Alternate("glGetProgramStringARB")
|
||||
@Code("\t\tint programLength = glGetProgramARB(target, GL_PROGRAM_LENGTH_ARB);")
|
||||
@GLreturn(value="paramString", maxLength = "programLength", forceMaxLength = true)
|
||||
void glGetProgramStringARB2(@GLenum int target, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString);
|
||||
|
||||
boolean glIsProgramARB(@GLuint int program);
|
||||
}
|
||||
|
|
|
@ -47,8 +47,15 @@ public interface ARB_sampler_objects {
|
|||
|
||||
void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers);
|
||||
|
||||
@Alternate("glGenSamplers")
|
||||
@GLreturn("samplers")
|
||||
void glGenSamplers2(@Constant("1") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers);
|
||||
|
||||
void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers);
|
||||
|
||||
@Alternate("glDeleteSamplers")
|
||||
void glDeleteSamplers(@Constant("1") @GLsizei int count, @Constant(value = "APIUtils.getBufferInt().put(0, sampler), 0", keepParam = true) int sampler);
|
||||
|
||||
boolean glIsSampler(@GLuint int sampler);
|
||||
|
||||
void glBindSampler(@GLenum int unit, @GLuint int sampler);
|
||||
|
@ -72,13 +79,33 @@ public interface ARB_sampler_objects {
|
|||
@StripPostfix("params")
|
||||
void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameteriv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterfv2(@GLuint int sampler, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterIiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterIiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterIfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
void glGetSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterIuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterIuiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
}
|
|
@ -33,18 +33,16 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public interface ARB_shader_objects {
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> argument of GetHandleARB:
|
||||
*/
|
||||
/** Accepted by the <pname> argument of GetHandleARB: */
|
||||
int GL_PROGRAM_OBJECT_ARB = 0x8B40;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetObjectParameter{fi}vARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetObjectParameter{fi}vARB: */
|
||||
int GL_OBJECT_TYPE_ARB = 0x8B4E;
|
||||
int GL_OBJECT_SUBTYPE_ARB = 0x8B4F;
|
||||
int GL_OBJECT_DELETE_STATUS_ARB = 0x8B80;
|
||||
|
@ -57,14 +55,10 @@ public interface ARB_shader_objects {
|
|||
int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87;
|
||||
int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88;
|
||||
|
||||
/**
|
||||
* Returned by the <params> parameter of GetObjectParameter{fi}vARB:
|
||||
*/
|
||||
/** Returned by the <params> parameter of GetObjectParameter{fi}vARB: */
|
||||
int GL_SHADER_OBJECT_ARB = 0x8B48;
|
||||
|
||||
/**
|
||||
* Returned by the <type> parameter of GetActiveUniformARB:
|
||||
*/
|
||||
/** Returned by the <type> parameter of GetActiveUniformARB: */
|
||||
int GL_FLOAT = 0x1406;
|
||||
int GL_FLOAT_VEC2_ARB = 0x8B50;
|
||||
int GL_FLOAT_VEC3_ARB = 0x8B51;
|
||||
|
@ -114,7 +108,7 @@ public interface ARB_shader_objects {
|
|||
@Alternate(value = "glShaderSourceARB", nativeAlt = true)
|
||||
void glShaderSourceARB3(@GLhandleARB int shader, @Constant("strings.length") @GLsizei int count,
|
||||
@Const @StringList(value = "count", lengths = "length") CharSequence[] strings,
|
||||
@Constant("StringUtils.getLengths(strings), 0") @Const IntBuffer length);
|
||||
@Constant("APIUtils.getLengths(strings), 0") @Const IntBuffer length);
|
||||
|
||||
void glCompileShaderARB(@GLhandleARB int shaderObj);
|
||||
|
||||
|
@ -181,22 +175,32 @@ public interface ARB_shader_objects {
|
|||
@StripPostfix("params")
|
||||
void glGetObjectParameterfvARB(@GLhandleARB int obj, @GLenum int pname, @OutParameter @Check FloatBuffer params);
|
||||
|
||||
@Alternate("glGetObjectParameterfvARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetObjectParameterfvARB2(@GLhandleARB int obj, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetObjectParameterivARB(@GLhandleARB int obj, @GLenum int pname, @OutParameter @Check IntBuffer params);
|
||||
|
||||
@Alternate("glGetObjectParameterivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetObjectParameterivARB2(@GLhandleARB int obj, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGetInfoLogARB(@GLhandleARB int obj, @AutoSize("infoLog") @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer infoLog);
|
||||
@OutParameter @GLcharARB ByteBuffer infoLog);
|
||||
|
||||
@Alternate("glGetInfoLogARB")
|
||||
@GLstring(string = "infoLog", maxLength = "maxLength")
|
||||
@GLreturn(value = "infoLog", maxLength = "maxLength")
|
||||
void glGetInfoLogARB2(@GLhandleARB int obj, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("infoLog_length, 0") IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer infoLog);
|
||||
@OutParameter @GLsizei @Constant("infoLog_length, 0") IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer infoLog);
|
||||
|
||||
void glGetAttachedObjectsARB(@GLhandleARB int containerObj, @AutoSize("obj") @GLsizei int maxCount,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer count,
|
||||
@OutParameter @GLhandleARB IntBuffer obj);
|
||||
@OutParameter @GLhandleARB IntBuffer obj);
|
||||
|
||||
/**
|
||||
* Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a <b>null-terminated</b> string.
|
||||
|
@ -210,18 +214,18 @@ public interface ARB_shader_objects {
|
|||
int glGetUniformLocationARB(@GLhandleARB int programObj, @NullTerminated CharSequence name);
|
||||
|
||||
void glGetActiveUniformARB(@GLhandleARB int programObj, @GLuint int index, @AutoSize("name") @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@OutParameter @GLcharARB ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveUniformARB")
|
||||
@GLstring(string = "name", maxLength = "maxLength")
|
||||
@GLreturn(value = "name", maxLength = "maxLength")
|
||||
void glGetActiveUniformARB2(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@OutParameter @GLcharARB ByteBuffer name);
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@OutParameter @GLcharARB ByteBuffer name);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetUniformfvARB(@GLhandleARB int programObj, int location, @OutParameter @Check FloatBuffer params);
|
||||
|
@ -230,13 +234,13 @@ public interface ARB_shader_objects {
|
|||
void glGetUniformivARB(@GLhandleARB int programObj, int location, @OutParameter @Check IntBuffer params);
|
||||
|
||||
void glGetShaderSourceARB(@GLhandleARB int obj, @AutoSize("source") @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer source);
|
||||
|
||||
@Alternate("glGetShaderSourceARB")
|
||||
@GLstring(string = "source", maxLength = "maxLength")
|
||||
void glGetShaderSourceARB2(@GLhandleARB int obj, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("source_length, 0") IntBuffer length,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer source);
|
||||
|
||||
@Alternate("glGetShaderSourceARB")
|
||||
@GLreturn(value = "source", maxLength = "maxLength")
|
||||
void glGetShaderSourceARB2(@GLhandleARB int obj, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("source_length, 0") IntBuffer length,
|
||||
@OutParameter @GLcharARB ByteBuffer source);
|
||||
|
||||
}
|
||||
|
|
|
@ -68,23 +68,49 @@ public interface ARB_shader_subroutine {
|
|||
void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
|
||||
@Check("1") @OutParameter IntBuffer values);
|
||||
|
||||
void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index,
|
||||
@AutoSize("name") @GLsizei int bufsize,
|
||||
@Alternate("glGetActiveSubroutineUniformiv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetActiveSubroutineUniformiv2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
|
||||
@OutParameter IntBuffer values);
|
||||
|
||||
void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length,
|
||||
@OutParameter ByteBuffer name);
|
||||
|
||||
void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index,
|
||||
@AutoSize("name") @GLsizei int bufsize,
|
||||
@Alternate("glGetActiveSubroutineUniformName")
|
||||
@GLreturn(value = "name", maxLength = "bufsize")
|
||||
void glGetActiveSubroutineUniformName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize,
|
||||
@OutParameter @Constant("name_length, 0") @GLsizei IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length,
|
||||
@OutParameter ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveSubroutineName")
|
||||
@GLreturn(value = "name", maxLength = "bufsize")
|
||||
void glGetActiveSubroutineName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize,
|
||||
@OutParameter @Constant("name_length, 0") @GLsizei IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@StripPostfix("indices")
|
||||
void glUniformSubroutinesuiv(@GLenum int shadertype, @AutoSize("indices") @GLsizei int count, @Const @GLuint IntBuffer indices);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetUniformSubroutineuiv(@GLenum int shadertype, int location, @Check("1") @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetUniformSubroutineuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetUniformSubroutineuiv2(@GLenum int shadertype, int location, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@StripPostfix("values")
|
||||
void glGetProgramStageiv(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @Check("1") @OutParameter IntBuffer values);
|
||||
|
||||
@Alternate("glGetProgramStageiv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetProgramStageiv2(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @OutParameter IntBuffer values);
|
||||
|
||||
}
|
|
@ -52,7 +52,7 @@ public interface ARB_shading_language_include {
|
|||
@Alternate("glNamedStringARB")
|
||||
void glNamedStringARB(@GLenum int type,
|
||||
@Constant("name.length()") int namelen, CharSequence name,
|
||||
@Constant("string.length()") int stringlen, @GLstringOffset("name.length()") CharSequence string);
|
||||
@Constant("string.length()") int stringlen, CharSequence string);
|
||||
|
||||
void glDeleteNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name);
|
||||
|
||||
|
@ -66,7 +66,7 @@ public interface ARB_shading_language_include {
|
|||
@Alternate(value = "glCompileShaderIncludeARB", nativeAlt = true)
|
||||
void glCompileShaderIncludeARB2(@GLuint int shader, @Constant("path.length") @GLsizei int count,
|
||||
@Const @StringList(value = "count", lengths = "length") CharSequence[] path,
|
||||
@Constant("StringUtils.getLengths(path), 0") @Const IntBuffer length);
|
||||
@Constant("APIUtils.getLengths(path), 0") @Const IntBuffer length);
|
||||
|
||||
boolean glIsNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name);
|
||||
|
||||
|
@ -76,19 +76,31 @@ public interface ARB_shading_language_include {
|
|||
void glGetNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name,
|
||||
@AutoSize("string") @GLsizei int bufSize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen,
|
||||
@OutParameter ByteBuffer string);
|
||||
@OutParameter @GLchar ByteBuffer string);
|
||||
|
||||
@Alternate("glGetNamedStringARB")
|
||||
void glGetNamedStringARB(@Constant("name.length()") int namelen, CharSequence name,
|
||||
@AutoSize("string") @GLsizei int bufSize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen,
|
||||
@OutParameter ByteBuffer string);
|
||||
@OutParameter @GLchar ByteBuffer string);
|
||||
|
||||
@Alternate("glGetNamedStringARB")
|
||||
@GLreturn(value = "string", maxLength = "bufSize")
|
||||
void glGetNamedStringARB2(@Constant("name.length()") int namelen, CharSequence name,
|
||||
@GLsizei int bufSize,
|
||||
@OutParameter @Constant("string_length, 0") IntBuffer stringlen,
|
||||
@OutParameter @GLchar ByteBuffer string);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetNamedStringivARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, @GLenum int pname, @Check("1") @OutParameter IntBuffer params);
|
||||
void glGetNamedStringivARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
@Alternate("glGetNamedStringivARB")
|
||||
void glGetNamedStringivARB2(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @Check("1") @OutParameter IntBuffer params);
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetNamedStringivARB(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetNamedStringivARB")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetNamedStringivARB2(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
}
|
|
@ -85,10 +85,20 @@ public interface ARB_sync {
|
|||
@StripPostfix(value = "params", postfix = "64")
|
||||
void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params);
|
||||
|
||||
@Alternate("glGetInteger64v")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "64")
|
||||
void glGetInteger64v2(@GLenum int pname, @OutParameter @GLint64 LongBuffer params);
|
||||
|
||||
@StripPostfix("values")
|
||||
void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname,
|
||||
@AutoSize("values") @GLsizei int bufSize,
|
||||
void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter IntBuffer values);
|
||||
|
||||
@Alternate("glGetSynciv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetSynciv2(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("null, 0") IntBuffer length,
|
||||
@OutParameter IntBuffer values);
|
||||
}
|
|
@ -56,7 +56,17 @@ public interface ARB_timer_query {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjecti64v")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64 LongBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64 LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectui64v")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64 LongBuffer params);
|
||||
|
||||
}
|
|
@ -52,7 +52,14 @@ public interface ARB_transform_feedback2 {
|
|||
|
||||
void glDeleteTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids);
|
||||
|
||||
void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids);
|
||||
@Alternate("glDeleteTransformFeedbacks")
|
||||
void glDeleteTransformFeedbacks(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, id), 0", keepParam = true) int id);
|
||||
|
||||
void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glGenTransformFeedbacks")
|
||||
@GLreturn("ids")
|
||||
void glGenTransformFeedbacks2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
boolean glIsTransformFeedback(@GLuint int id);
|
||||
|
||||
|
|
|
@ -54,4 +54,9 @@ public interface ARB_transform_feedback3 {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryIndexediv(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryIndexediv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryIndexediv2(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
}
|
|
@ -110,14 +110,23 @@ public interface ARB_uniform_buffer_object {
|
|||
@StripPostfix("params")
|
||||
void glGetActiveUniformsiv(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount,
|
||||
@Const @GLuint IntBuffer uniformIndices,
|
||||
@GLenum int pname, @Check("uniformIndices.remaining()") @GLint IntBuffer params);
|
||||
@GLenum int pname,
|
||||
@OutParameter @Check("uniformIndices.remaining()") @GLint IntBuffer params);
|
||||
|
||||
@Alternate("glGetActiveUniformsiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetActiveUniformsiv(@GLuint int program, @Constant("1") @GLsizei int uniformCount,
|
||||
@Constant(value = "APIUtils.getBufferInt().put(1, uniformIndex), 1", keepParam = true) int uniformIndex, // index 0 used by return value
|
||||
@GLenum int pname,
|
||||
@OutParameter @GLint IntBuffer params);
|
||||
|
||||
void glGetActiveUniformName(@GLuint int program, @GLuint int uniformIndex, @AutoSize("uniformName") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer uniformName);
|
||||
|
||||
@Alternate("glGetActiveUniformName")
|
||||
@GLstring(string = "uniformName", maxLength = "bufSize")
|
||||
@GLreturn(value = "uniformName", maxLength = "bufSize")
|
||||
void glGetActiveUniformName2(@GLuint int program, @GLuint int uniformIndex, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("uniformName_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer uniformName);
|
||||
|
@ -133,12 +142,18 @@ public interface ARB_uniform_buffer_object {
|
|||
void glGetActiveUniformBlockiv(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname,
|
||||
@OutParameter @Check(value = "16") @GLint IntBuffer params);
|
||||
|
||||
@Alternate("glGetActiveUniformBlockiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetActiveUniformBlockiv2(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname,
|
||||
@OutParameter @GLint IntBuffer params);
|
||||
|
||||
void glGetActiveUniformBlockName(@GLuint int program, @GLuint int uniformBlockIndex, @AutoSize("uniformBlockName") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer uniformBlockName);
|
||||
|
||||
@Alternate("glGetActiveUniformBlockName")
|
||||
@GLstring(string = "uniformBlockName", maxLength = "bufSize")
|
||||
@GLreturn(value = "uniformBlockName", maxLength = "bufSize")
|
||||
void glGetActiveUniformBlockName2(@GLuint int program, @GLuint int uniformBlockIndex, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("uniformBlockName_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer uniformBlockName);
|
||||
|
@ -150,6 +165,11 @@ public interface ARB_uniform_buffer_object {
|
|||
@StripPostfix(value = "data", extension = "")
|
||||
void glGetIntegeri_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data);
|
||||
|
||||
@Alternate("glGetIntegeri_v")
|
||||
@GLreturn("data")
|
||||
@StripPostfix("data")
|
||||
void glGetIntegeri_v2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data);
|
||||
|
||||
void glUniformBlockBinding(@GLuint int program, @GLuint int uniformBlockIndex, @GLuint int uniformBlockBinding);
|
||||
|
||||
}
|
|
@ -47,8 +47,15 @@ public interface ARB_vertex_array_object {
|
|||
|
||||
void glDeleteVertexArrays(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays);
|
||||
|
||||
@Alternate("glDeleteVertexArrays")
|
||||
void glDeleteVertexArrays(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, array), 0", keepParam = true) int array);
|
||||
|
||||
void glGenVertexArrays(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays);
|
||||
|
||||
@Alternate("glGenVertexArrays")
|
||||
@GLreturn("arrays")
|
||||
void glGenVertexArrays2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays);
|
||||
|
||||
boolean glIsVertexArray(@GLuint int array);
|
||||
|
||||
}
|
|
@ -56,9 +56,7 @@ public interface ARB_vertex_program extends ARB_program {
|
|||
int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
|
||||
int GL_COLOR_SUM_ARB = 0x8458;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB: */
|
||||
int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
|
||||
int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
|
||||
int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
|
||||
|
@ -66,14 +64,10 @@ public interface ARB_vertex_program extends ARB_program {
|
|||
int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
|
||||
int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetVertexAttribPointervARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetVertexAttribPointervARB: */
|
||||
int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetProgramivARB:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetProgramivARB: */
|
||||
int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0;
|
||||
int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
|
||||
int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
|
||||
|
@ -112,7 +106,7 @@ public interface ARB_vertex_program extends ARB_program {
|
|||
void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
|
||||
|
||||
void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
|
||||
@CachedReference(index="index",name="glVertexAttribPointer_buffer")
|
||||
@CachedReference(index = "index", name = "glVertexAttribPointer_buffer")
|
||||
@BufferObject(BufferKind.ArrayVBO)
|
||||
@Check
|
||||
@Const
|
||||
|
|
|
@ -151,7 +151,7 @@ public interface ARB_vertex_shader {
|
|||
@OutParameter @GLcharARB ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveAttribARB")
|
||||
@GLstring(string = "name", maxLength = "maxLength")
|
||||
@GLreturn(value = "name", maxLength = "maxLength")
|
||||
void glGetActiveAttribARB2(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
|
|
|
@ -60,4 +60,7 @@ public interface ATI_draw_buffers {
|
|||
int GL_DRAW_BUFFER15_ATI = 0x8834;
|
||||
|
||||
void glDrawBuffersATI(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers);
|
||||
|
||||
@Alternate("glDrawBuffersATI")
|
||||
void glDrawBuffersATI(@Constant("1") @GLsizei int size, @Constant(value = "APIUtils.getBufferInt().put(0, buffer), 0", keepParam = true) int buffer);
|
||||
}
|
||||
|
|
|
@ -194,15 +194,35 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetTextureParameterfvEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTextureParameterfvEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureParameterfvEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTextureParameterivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTextureParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureParameterivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTextureLevelParameterfvEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTextureLevelParameterfvEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureLevelParameterfvEXT2(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTextureLevelParameterivEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTextureLevelParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureLevelParameterivEXT2(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
/*
|
||||
OpenGL 1.2: New 3D texture object commands replace "Tex" in name with
|
||||
"Texture" and adds initial "uint texture" parameter
|
||||
|
@ -414,18 +434,41 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetMultiTexParameterfvEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexParameterfvEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexParameterfvEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix("params")
|
||||
void glGetMultiTexParameterivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexParameterivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix("params")
|
||||
void glGetMultiTexLevelParameterfvEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexLevelParameterfvEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexLevelParameterfvEXT2(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix("params")
|
||||
void glGetMultiTexLevelParameterivEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexLevelParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexLevelParameterivEXT2(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
void glMultiTexImage3DEXT(@GLenum int texunit, @GLenum int target, int level,
|
||||
int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type,
|
||||
|
@ -492,10 +535,22 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetFloatIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetFloatIndexedvEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix("params")
|
||||
void glGetFloatIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter FloatBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix(value = "params", hasPostfix = false)
|
||||
void glGetDoubleIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params);
|
||||
|
||||
@Alternate("glGetDoubleIndexedvEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix(value = "params", hasPostfix = false)
|
||||
void glGetDoubleIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter DoubleBuffer params);
|
||||
|
||||
@Dependent("OpenGL13")
|
||||
@StripPostfix("params")
|
||||
void glGetPointerIndexedvEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params);
|
||||
|
@ -511,10 +566,22 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetFloati_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetFloati_vEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix("params")
|
||||
void glGetFloati_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter FloatBuffer params);
|
||||
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix("params")
|
||||
void glGetDoublei_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params);
|
||||
|
||||
@Alternate("glGetDoublei_vEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix("params")
|
||||
void glGetDoublei_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter DoubleBuffer params);
|
||||
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix(value = "params", hasPostfix = false)
|
||||
void glGetPointeri_vEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params);
|
||||
|
@ -538,10 +605,22 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") IntBuffer params);
|
||||
|
||||
@Alternate("glGetIntegerIndexedvEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_draw_buffers2")
|
||||
@StripPostfix("params")
|
||||
void glGetIntegerIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("GL_EXT_draw_buffers2")
|
||||
@StripPostfix("params")
|
||||
void glGetBooleanIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") @GLboolean ByteBuffer params);
|
||||
|
||||
@Alternate("glGetBooleanIndexedvEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_draw_buffers2")
|
||||
@StripPostfix("params")
|
||||
void glGetBooleanIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter @GLboolean ByteBuffer params);
|
||||
|
||||
/*
|
||||
ARB_vertex_program: New program commands and queries add "Named"
|
||||
prefix to name and adds initial "uint program" parameter
|
||||
|
@ -550,6 +629,10 @@ public interface EXT_direct_state_access {
|
|||
@Dependent("GL_ARB_vertex_program")
|
||||
void glNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int format, @AutoSize("string") @GLsizei int len, @Const @GLvoid Buffer string);
|
||||
|
||||
@Alternate("glNamedProgramStringEXT")
|
||||
@Dependent("GL_ARB_vertex_program")
|
||||
void glNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int format, @Constant("string.length()") @GLsizei int length, CharSequence string);
|
||||
|
||||
@Dependent("GL_ARB_vertex_program")
|
||||
void glNamedProgramLocalParameter4dEXT(@GLuint int program, @GLenum int target, @GLuint int index, double x, double y, double z, double w);
|
||||
|
||||
|
@ -576,9 +659,20 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetNamedProgramivEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetNamedProgramivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_ARB_vertex_program")
|
||||
@StripPostfix("params")
|
||||
void glGetNamedProgramivEXT2(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("GL_ARB_vertex_program")
|
||||
void glGetNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check @GLvoid ByteBuffer string);
|
||||
|
||||
@Alternate("glGetNamedProgramStringEXT")
|
||||
@Code("\t\tint programLength = glGetNamedProgramEXT(program, target, ARBProgram.GL_PROGRAM_LENGTH_ARB);")
|
||||
@GLreturn(value = "paramString", maxLength = "programLength", forceMaxLength = true)
|
||||
void glGetNamedProgramStringEXT2(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @GLchar ByteBuffer paramString);
|
||||
|
||||
/*
|
||||
OpenGL 1.3: New compressed texture object commands replace "Tex"
|
||||
in name with "Texture" and add initial "uint texture" parameter
|
||||
|
@ -796,8 +890,8 @@ public interface EXT_direct_state_access {
|
|||
* Security warning: The length argument should match the buffer object size. Reading from or writing to outside
|
||||
* the memory region that corresponds to the mapped buffer object will cause native crashes.
|
||||
*
|
||||
* @param length the length of the mapped memory in bytes.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
* @param length the length of the mapped memory in bytes.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
*
|
||||
* @return A ByteBuffer representing the mapped buffer memory.
|
||||
*/
|
||||
|
@ -814,6 +908,12 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetNamedBufferParameterivEXT(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetNamedBufferParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL15")
|
||||
@StripPostfix("params")
|
||||
void glGetNamedBufferParameterivEXT2(@GLuint int buffer, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("OpenGL15")
|
||||
@StripPostfix("params")
|
||||
@AutoResultSize("GLChecks.getNamedBufferObjectSize(caps, buffer)")
|
||||
|
@ -964,18 +1064,40 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params);
|
||||
|
||||
@Alternate("glTextureParameterIivEXT")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("param")
|
||||
void glTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glTextureParameterIuivEXT")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("param")
|
||||
void glTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) @GLuint int param);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glGetTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetTextureParameterIivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureParameterIivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glGetTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetTextureParameterIuivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTextureParameterIuivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
/*
|
||||
EXT_texture_integer: New multitexture integer texture commands and
|
||||
queries prefix "Multi" before "Tex" and add an initial "enum texunit"
|
||||
|
@ -986,18 +1108,40 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params);
|
||||
|
||||
@Alternate("glMultiTexParameterIivEXT")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("param")
|
||||
void glMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glMultiTexParameterIuivEXT")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("param")
|
||||
void glMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glGetMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexParameterIivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexParameterIivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix("params")
|
||||
void glGetMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetMultiTexParameterIuivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("GL_EXT_texture_integer")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetMultiTexParameterIuivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
/*
|
||||
EXT_gpu_shader4: New integer uniform commands add "Program" prefix
|
||||
to name and add initial "uint program" parameter
|
||||
|
@ -1090,6 +1234,12 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetNamedRenderbufferParameterivEXT(@GLuint int renderbuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetNamedRenderbufferParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL30,GL_EXT_framebuffer_object")
|
||||
@StripPostfix("params")
|
||||
void glGetNamedRenderbufferParameterivEXT2(@GLuint int renderbuffer, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
/*
|
||||
EXT_framebuffer_multisample: New renderbuffer commands add "Named"
|
||||
prefix to name and replace "enum target" with "uint renderbuffer"
|
||||
|
@ -1132,10 +1282,16 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("params")
|
||||
void glGetNamedFramebufferAttachmentParameterivEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetNamedFramebufferAttachmentParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@Dependent("OpenGL30,GL_EXT_framebuffer_object")
|
||||
@StripPostfix("params")
|
||||
void glGetNamedFramebufferAttachmentParameterivEXT2(@GLuint int framebuffer, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
/*
|
||||
OpenGL 3.0: New texture commands add "Texture" within name and
|
||||
replace "enum target" with "uint texture"
|
||||
*/
|
||||
OpenGL 3.0: New texture commands add "Texture" within name and
|
||||
replace "enum target" with "uint texture"
|
||||
*/
|
||||
|
||||
@Dependent("OpenGL30,GL_EXT_framebuffer_object")
|
||||
void glGenerateTextureMipmapEXT(@GLuint int texture, @GLenum int target);
|
||||
|
@ -1169,6 +1325,12 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("param")
|
||||
void glGetFramebufferParameterivEXT(@GLuint int framebuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer param);
|
||||
|
||||
@Alternate("glGetFramebufferParameterivEXT")
|
||||
@GLreturn("param")
|
||||
@Dependent("OpenGL30,GL_EXT_framebuffer_object")
|
||||
@StripPostfix("param")
|
||||
void glGetFramebufferParameterivEXT2(@GLuint int framebuffer, @GLenum int pname, @OutParameter IntBuffer param);
|
||||
|
||||
/*
|
||||
OpenGL 3.1: New buffer data copy command
|
||||
*/
|
||||
|
@ -1289,16 +1451,28 @@ public interface EXT_direct_state_access {
|
|||
@StripPostfix("param")
|
||||
void glGetVertexArrayIntegervEXT(@GLuint int vaobj, @GLenum int pname, @OutParameter @Check("16") IntBuffer param);
|
||||
|
||||
@Alternate("glGetVertexArrayIntegervEXT")
|
||||
@GLreturn("param")
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix("param")
|
||||
void glGetVertexArrayIntegervEXT2(@GLuint int vaobj, @GLenum int pname, @OutParameter IntBuffer param);
|
||||
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix("param")
|
||||
void glGetVertexArrayPointervEXT(@GLuint int vaobj, @GLenum int pname, @Result @GLvoid ByteBuffer param);
|
||||
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix(value = "param", hasPostfix = false)
|
||||
@StripPostfix(value = "param")
|
||||
void glGetVertexArrayIntegeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @OutParameter @Check("16") IntBuffer param);
|
||||
|
||||
@Alternate("glGetVertexArrayIntegeri_vEXT")
|
||||
@GLreturn("param")
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix(value = "param", hasPostfix = false)
|
||||
@StripPostfix(value = "param", postfix = "_v")
|
||||
void glGetVertexArrayIntegeri_vEXT2(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer param);
|
||||
|
||||
@Dependent("OpenGL30")
|
||||
@StripPostfix(value = "param")
|
||||
void glGetVertexArrayPointeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer param);
|
||||
|
||||
/*
|
||||
|
@ -1316,7 +1490,7 @@ public interface EXT_direct_state_access {
|
|||
* <p/>
|
||||
* Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused.
|
||||
*
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
*
|
||||
* @return A ByteBuffer representing the mapped buffer memory.
|
||||
*/
|
||||
|
|
|
@ -43,9 +43,19 @@ public interface EXT_draw_buffers2 {
|
|||
@StripPostfix("data")
|
||||
void glGetBooleanIndexedvEXT(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data);
|
||||
|
||||
@Alternate("glGetBooleanIndexedvEXT")
|
||||
@GLreturn("data")
|
||||
@StripPostfix("data")
|
||||
void glGetBooleanIndexedvEXT2(@GLenum int value, @GLuint int index, @OutParameter @GLboolean ByteBuffer data);
|
||||
|
||||
@StripPostfix("data")
|
||||
void glGetIntegerIndexedvEXT(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data);
|
||||
|
||||
@Alternate("glGetIntegerIndexedvEXT")
|
||||
@GLreturn("data")
|
||||
@StripPostfix("data")
|
||||
void glGetIntegerIndexedvEXT2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data);
|
||||
|
||||
void glEnableIndexedEXT(@GLenum int target, @GLuint int index);
|
||||
|
||||
void glDisableIndexedEXT(@GLenum int target, @GLuint int index);
|
||||
|
|
|
@ -33,7 +33,7 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public interface EXT_framebuffer_object {
|
||||
|
||||
|
@ -60,9 +60,7 @@ public interface EXT_framebuffer_object {
|
|||
int GL_STENCIL_INDEX8_EXT = 0x8D48;
|
||||
int GL_STENCIL_INDEX16_EXT = 0x8D49;
|
||||
|
||||
/**
|
||||
* Accepted by the <pname> parameter of GetRenderbufferParameterivEXT:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetRenderbufferParameterivEXT: */
|
||||
int GL_RENDERBUFFER_WIDTH_EXT = 0x8D42;
|
||||
int GL_RENDERBUFFER_HEIGHT_EXT = 0x8D43;
|
||||
int GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44;
|
||||
|
@ -107,9 +105,7 @@ public interface EXT_framebuffer_object {
|
|||
int GL_DEPTH_ATTACHMENT_EXT = 0x8D00;
|
||||
int GL_STENCIL_ATTACHMENT_EXT = 0x8D20;
|
||||
|
||||
/**
|
||||
* Returned by CheckFramebufferStatusEXT():
|
||||
*/
|
||||
/** Returned by CheckFramebufferStatusEXT(): */
|
||||
int GL_FRAMEBUFFER_COMPLETE_EXT = 0x8CD5;
|
||||
int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6;
|
||||
int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7;
|
||||
|
@ -119,17 +115,13 @@ public interface EXT_framebuffer_object {
|
|||
int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC;
|
||||
int GL_FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD;
|
||||
|
||||
/**
|
||||
* Accepted by GetIntegerv():
|
||||
*/
|
||||
/** Accepted by GetIntegerv(): */
|
||||
int GL_FRAMEBUFFER_BINDING_EXT = 0x8CA6;
|
||||
int GL_RENDERBUFFER_BINDING_EXT = 0x8CA7;
|
||||
int GL_MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF;
|
||||
int GL_MAX_RENDERBUFFER_SIZE_EXT = 0x84E8;
|
||||
|
||||
/**
|
||||
* Returned by GetError():
|
||||
*/
|
||||
/** Returned by GetError(): */
|
||||
int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506;
|
||||
|
||||
boolean glIsRenderbufferEXT(@GLuint int renderbuffer);
|
||||
|
@ -138,21 +130,40 @@ public interface EXT_framebuffer_object {
|
|||
|
||||
void glDeleteRenderbuffersEXT(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glDeleteRenderbuffersEXT")
|
||||
void glDeleteRenderbuffersEXT(@Constant("1") int n, @Constant(value = "APIUtils.getBufferInt().put(0, renderbuffer), 0", keepParam = true) int renderbuffer);
|
||||
|
||||
void glGenRenderbuffersEXT(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glGenRenderbuffersEXT")
|
||||
@GLreturn("renderbuffers")
|
||||
void glGenRenderbuffersEXT2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
void glRenderbufferStorageEXT(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameterivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetRenderbufferParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameterivEXT2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
boolean glIsFramebufferEXT(@GLuint int framebuffer);
|
||||
|
||||
void glBindFramebufferEXT(@GLenum int target, @GLuint int framebuffer);
|
||||
|
||||
void glDeleteFramebuffersEXT(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glDeleteFramebuffersEXT")
|
||||
void glDeleteFramebuffersEXT(@Constant("1") int n, @Constant(value = "APIUtils.getBufferInt().put(0, framebuffer), 0", keepParam = true) int framebuffer);
|
||||
|
||||
void glGenFramebuffersEXT(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glGenFramebuffersEXT")
|
||||
@GLreturn("framebuffers")
|
||||
void glGenFramebuffersEXT2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@GLenum
|
||||
int glCheckFramebufferStatusEXT(@GLenum int target);
|
||||
|
||||
|
@ -167,5 +178,10 @@ public interface EXT_framebuffer_object {
|
|||
@StripPostfix("params")
|
||||
void glGetFramebufferAttachmentParameterivEXT(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetFramebufferAttachmentParameterivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetFramebufferAttachmentParameterivEXT2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGenerateMipmapEXT(@GLenum int target);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,5 @@ import org.lwjgl.util.generator.*;
|
|||
import java.nio.*;
|
||||
|
||||
public interface EXT_multi_draw_arrays {
|
||||
@Code(" if (piFirst.remaining() != piCount.remaining()) {\n" +
|
||||
" throw new IllegalArgumentException(\"piFirst.remaining() != piCount.remaining()\");\n" +
|
||||
" }")
|
||||
void glMultiDrawArraysEXT(@GLenum int mode, IntBuffer piFirst, @Check @GLsizei IntBuffer piCount, @AutoSize("piFirst") int primcount);
|
||||
void glMultiDrawArraysEXT(@GLenum int mode, IntBuffer piFirst, @Check("piFirst.remaining()") @GLsizei IntBuffer piCount, @AutoSize("piFirst") int primcount);
|
||||
}
|
||||
|
|
|
@ -31,11 +31,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.util.generator.Check;
|
||||
import org.lwjgl.util.generator.GLenum;
|
||||
import org.lwjgl.util.generator.GLuint;
|
||||
import org.lwjgl.util.generator.StripPostfix;
|
||||
import org.lwjgl.util.generator.OutParameter;
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
|
@ -116,13 +112,31 @@ public interface EXT_texture_integer {
|
|||
@StripPostfix("params")
|
||||
void glTexParameterIivEXT(@GLenum int target, @GLenum int pname, @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glTexParameterIivEXT")
|
||||
@StripPostfix(value = "param", postfix = "v")
|
||||
void glTexParameterIivEXT(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @Check("4") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glTexParameterIuivEXT")
|
||||
@StripPostfix(value = "param", postfix = "v")
|
||||
void glTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexParameterIivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameterIivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameterIivEXT2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameterIuivEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameterIuivEXT2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,17 @@ public interface EXT_timer_query {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64vEXT(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64EXT LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjecti64vEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64vEXT2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64EXT LongBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64vEXT(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectui64vEXT")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64vEXT2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params);
|
||||
|
||||
}
|
||||
|
|
|
@ -114,14 +114,14 @@ public interface EXT_transform_feedback {
|
|||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@GLchar ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetTransformFeedbackVaryingEXT")
|
||||
@GLstring(string = "name", maxLength = "bufSize")
|
||||
@GLreturn(value = "name", maxLength = "bufSize")
|
||||
void glGetTransformFeedbackVaryingEXT2(@GLuint int program, @GLuint int index, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@GLchar ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
}
|
|
@ -32,17 +32,15 @@
|
|||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.util.generator.*;
|
||||
import org.lwjgl.util.generator.DeprecatedGL;
|
||||
|
||||
import java.nio.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* The core OpenGL1.1 API.
|
||||
*
|
||||
* @author cix_foo <cix_foo@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
* $Id$
|
||||
* $Id$
|
||||
*/
|
||||
@DeprecatedGL
|
||||
public interface GL11 {
|
||||
|
@ -751,18 +749,18 @@ public interface GL11 {
|
|||
|
||||
@DeprecatedGL
|
||||
void glPrioritizeTextures(@AutoSize("textures") @GLsizei int n,
|
||||
@Const
|
||||
@GLuint IntBuffer textures,
|
||||
@Const
|
||||
@Check("textures.remaining()")
|
||||
@GLclampf FloatBuffer priorities);
|
||||
@Const
|
||||
@GLuint IntBuffer textures,
|
||||
@Const
|
||||
@Check("textures.remaining()")
|
||||
@GLclampf FloatBuffer priorities);
|
||||
|
||||
@DeprecatedGL
|
||||
boolean glAreTexturesResident(@AutoSize("textures") @GLsizei int n,
|
||||
@Const
|
||||
@GLuint IntBuffer textures,
|
||||
@Check("textures.remaining()")
|
||||
@GLboolean ByteBuffer residences);
|
||||
@Const
|
||||
@GLuint IntBuffer textures,
|
||||
@Check("textures.remaining()")
|
||||
@GLboolean ByteBuffer residences);
|
||||
|
||||
@NoErrorCheck
|
||||
@DeprecatedGL
|
||||
|
@ -781,6 +779,9 @@ public interface GL11 {
|
|||
|
||||
void glDeleteTextures(@AutoSize("textures") @GLsizei int n, @Const @GLuint IntBuffer textures);
|
||||
|
||||
@Alternate("glDeleteTextures")
|
||||
void glDeleteTextures(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, texture), 0", keepParam = true) int texture);
|
||||
|
||||
void glCullFace(@GLenum int mode);
|
||||
|
||||
void glCopyTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, int x, int y, @GLsizei int width, @GLsizei int height);
|
||||
|
@ -970,17 +971,41 @@ public interface GL11 {
|
|||
@StripPostfix("params")
|
||||
void glGetBooleanv(@GLenum int pname, @OutParameter @Check("16") @GLboolean ByteBuffer params);
|
||||
|
||||
@Alternate("glGetBooleanv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetBooleanv2(@GLenum int pname, @OutParameter @GLboolean ByteBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetDoublev(@GLenum int pname, @OutParameter @Check("16") DoubleBuffer params);
|
||||
|
||||
@Alternate("glGetDoublev")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetDoublev2(@GLenum int pname, @OutParameter DoubleBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetFloatv(@GLenum int pname, @OutParameter @Check("16") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetFloatv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetFloatv2(@GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetIntegerv(@GLenum int pname, @OutParameter @Check("16") IntBuffer params);
|
||||
|
||||
@Alternate("glGetIntegerv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetIntegerv2(@GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGenTextures(@AutoSize("textures") @GLsizei int n, @OutParameter @GLuint IntBuffer textures);
|
||||
|
||||
@Alternate("glGenTextures")
|
||||
@GLreturn("textures")
|
||||
void glGenTextures2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer textures);
|
||||
|
||||
@GLuint
|
||||
@DeprecatedGL
|
||||
int glGenLists(@GLsizei int range);
|
||||
|
@ -1031,17 +1056,37 @@ public interface GL11 {
|
|||
@StripPostfix("params")
|
||||
void glGetTexParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameterfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameterfv2(@GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexLevelParameterfv(@GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTexLevelParameterfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexLevelParameterfv2(@GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexLevelParameteriv(@GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexLevelParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexLevelParameteriv2(@GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGetTexImage(@GLenum int target, int level, @GLenum int format, @GLenum int type,
|
||||
@OutParameter
|
||||
@OutParameter
|
||||
@BufferObject(BufferKind.PackPBO)
|
||||
@Check("GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)")
|
||||
@GLbyte
|
||||
|
@ -1054,20 +1099,48 @@ public interface GL11 {
|
|||
@DeprecatedGL
|
||||
void glGetTexGeniv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexGeniv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
@DeprecatedGL
|
||||
void glGetTexGeniv2(@GLenum int coord, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
@DeprecatedGL
|
||||
void glGetTexGenfv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTexGenfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
@DeprecatedGL
|
||||
void glGetTexGenfv2(@GLenum int coord, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
@DeprecatedGL
|
||||
void glGetTexGendv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
|
||||
|
||||
@Alternate("glGetTexGendv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
@DeprecatedGL
|
||||
void glGetTexGendv2(@GLenum int coord, @GLenum int pname, @OutParameter DoubleBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexEnviv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexEnviv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexEnviv2(@GLenum int coord, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexEnvfv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetTexEnvfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexEnvfv2(@GLenum int coord, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@Const
|
||||
String glGetString(int name);
|
||||
|
||||
|
@ -1104,6 +1177,7 @@ public interface GL11 {
|
|||
void glMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2);
|
||||
|
||||
// TODO: check buffer size valid
|
||||
|
||||
@DeprecatedGL
|
||||
void glMap2f(@GLenum int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, @Check @Const FloatBuffer points);
|
||||
|
||||
|
@ -1111,6 +1185,7 @@ public interface GL11 {
|
|||
void glMap2d(@GLenum int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, @Check @Const DoubleBuffer points);
|
||||
|
||||
// TODO: check buffer size valid
|
||||
|
||||
@DeprecatedGL
|
||||
void glMap1f(@GLenum int target, float u1, float u2, int stride, int order, @Check @Const FloatBuffer points);
|
||||
|
||||
|
@ -1486,12 +1561,12 @@ public interface GL11 {
|
|||
|
||||
@DeprecatedGL
|
||||
void glTexCoordPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride,
|
||||
@CachedReference(index="GLChecks.getReferences(caps).glClientActiveTexture", name="glTexCoordPointer_buffer")
|
||||
@CachedReference(index = "GLChecks.getReferences(caps).glClientActiveTexture", name = "glTexCoordPointer_buffer")
|
||||
@BufferObject(BufferKind.ArrayVBO)
|
||||
@Check
|
||||
@Const
|
||||
@GLint
|
||||
@GLshort
|
||||
@GLint
|
||||
@GLshort
|
||||
@GLfloat
|
||||
@GLdouble Buffer pointer);
|
||||
|
||||
|
|
|
@ -113,10 +113,7 @@ public interface GL14 {
|
|||
@GLfloat
|
||||
@GLdouble Buffer data);
|
||||
|
||||
@Code(" if (piFirst.remaining() != piCount.remaining()) {\n" +
|
||||
" throw new IllegalArgumentException(\"piFirst.remaining() != piCount.remaining()\");\n" +
|
||||
" }")
|
||||
void glMultiDrawArrays(@GLenum int mode, IntBuffer piFirst, @Check @GLsizei IntBuffer piCount, @AutoSize("piFirst") @GLsizei int primcount);
|
||||
void glMultiDrawArrays(@GLenum int mode, IntBuffer piFirst, @Check("piFirst.remaining()") @GLsizei IntBuffer piCount, @AutoSize("piFirst") @GLsizei int primcount);
|
||||
|
||||
//void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);
|
||||
|
||||
|
|
|
@ -33,7 +33,9 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public interface GL15 {
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -92,8 +94,15 @@ public interface GL15 {
|
|||
|
||||
void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers);
|
||||
|
||||
@Alternate("glDeleteBuffers")
|
||||
void glDeleteBuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, buffer), 0", keepParam = true) int buffer);
|
||||
|
||||
void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers);
|
||||
|
||||
@Alternate("glGenBuffers")
|
||||
@GLreturn("buffers")
|
||||
void glGenBuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers);
|
||||
|
||||
boolean glIsBuffer(@GLuint int buffer);
|
||||
|
||||
@GenerateAutos
|
||||
|
@ -115,7 +124,7 @@ public interface GL15 {
|
|||
@GLdouble Buffer data);
|
||||
|
||||
void glGetBufferSubData(@GLenum int target, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size,
|
||||
@OutParameter
|
||||
@OutParameter
|
||||
@Check
|
||||
@GLbyte
|
||||
@GLshort
|
||||
|
@ -140,9 +149,8 @@ public interface GL15 {
|
|||
* is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.<br>
|
||||
* Security warning: The length argument should match the buffer object size. Reading from or writing to outside
|
||||
* the memory region that corresponds to the mapped buffer object will cause native crashes.
|
||||
*
|
||||
* @param length the length of the mapped memory in bytes.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
*
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.
|
||||
*
|
||||
* @return A ByteBuffer representing the mapped buffer memory.
|
||||
*/
|
||||
|
@ -156,6 +164,11 @@ public interface GL15 {
|
|||
@StripPostfix("params")
|
||||
void glGetBufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetBufferParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetBufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("pointer")
|
||||
@AutoResultSize("GLChecks.getBufferObjectSize(caps, target)")
|
||||
void glGetBufferPointerv(@GLenum int target, @GLenum int pname, @OutParameter @Result @GLvoid ByteBuffer pointer);
|
||||
|
@ -170,23 +183,28 @@ public interface GL15 {
|
|||
*/
|
||||
int GL_SAMPLES_PASSED = 0x8914;
|
||||
|
||||
/**
|
||||
Accepted by the <pname> parameter of GetQueryiv:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetQueryiv: */
|
||||
int GL_QUERY_COUNTER_BITS = 0x8864;
|
||||
int GL_CURRENT_QUERY = 0x8865;
|
||||
|
||||
/**
|
||||
Accepted by the <pname> parameter of GetQueryObjectiv and
|
||||
GetQueryObjectuiv:
|
||||
* Accepted by the <pname> parameter of GetQueryObjectiv and
|
||||
* GetQueryObjectuiv:
|
||||
*/
|
||||
int GL_QUERY_RESULT = 0x8866;
|
||||
int GL_QUERY_RESULT_AVAILABLE = 0x8867;
|
||||
|
||||
void glGenQueries(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glGenQueries")
|
||||
@GLreturn("ids")
|
||||
void glGenQueries2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
void glDeleteQueries(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glDeleteQueries")
|
||||
void glDeleteQueries(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, id), 0", keepParam = true) int id);
|
||||
|
||||
boolean glIsQuery(@GLuint int id);
|
||||
|
||||
void glBeginQuery(@GLenum int target, @GLuint int id);
|
||||
|
@ -196,9 +214,24 @@ public interface GL15 {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryiv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectiv(@GLenum int id, @GLenum int pname, @OutParameter @Check("1") @GLint IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetQueryObjectiv2(@GLenum int id, @GLenum int pname, @OutParameter @GLint IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectuiv(@GLenum int id, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetQueryObjectuiv2(@GLenum int id, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public interface GL20 {
|
|||
@Alternate(value = "glShaderSource", nativeAlt = true)
|
||||
void glShaderSource3(@GLuint int shader, @Constant("strings.length") @GLsizei int count,
|
||||
@Const @StringList(value = "count", lengths = "length") CharSequence[] strings,
|
||||
@Constant("StringUtils.getLengths(strings), 0") @Const IntBuffer length);
|
||||
@Constant("APIUtils.getLengths(strings), 0") @Const IntBuffer length);
|
||||
|
||||
int glCreateShader(@GLuint int type);
|
||||
|
||||
|
@ -187,15 +187,25 @@ public interface GL20 {
|
|||
@StripPostfix("params")
|
||||
void glGetShaderiv(@GLuint int shader, @GLenum int pname, @OutParameter @Check IntBuffer params);
|
||||
|
||||
@Alternate("glGetShaderiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetShaderiv2(@GLuint int shader, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetProgramiv(@GLuint int program, @GLenum int pname, @OutParameter @Check IntBuffer params);
|
||||
|
||||
@Alternate("glGetProgramiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetProgramiv2(@GLuint int program, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGetShaderInfoLog(@GLuint int shader, @AutoSize("infoLog") @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer infoLog);
|
||||
|
||||
@Alternate("glGetShaderInfoLog")
|
||||
@GLstring(string = "infoLog", maxLength = "maxLength")
|
||||
@GLreturn(value = "infoLog", maxLength = "maxLength")
|
||||
void glGetShaderInfoLog2(@GLuint int shader, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("infoLog_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer infoLog);
|
||||
|
@ -205,7 +215,7 @@ public interface GL20 {
|
|||
@OutParameter @GLchar ByteBuffer infoLog);
|
||||
|
||||
@Alternate("glGetProgramInfoLog")
|
||||
@GLstring(string = "infoLog", maxLength = "maxLength")
|
||||
@GLreturn(value = "infoLog", maxLength = "maxLength")
|
||||
void glGetProgramInfoLog2(@GLuint int program, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("infoLog_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer infoLog);
|
||||
|
@ -233,7 +243,7 @@ public interface GL20 {
|
|||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveUniform")
|
||||
@GLstring(string = "name", maxLength = "maxLength")
|
||||
@GLreturn(value = "name", maxLength = "maxLength")
|
||||
void glGetActiveUniform2(@GLuint int program, @GLuint int index, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
|
@ -251,7 +261,7 @@ public interface GL20 {
|
|||
@OutParameter @GLchar ByteBuffer source);
|
||||
|
||||
@Alternate("glGetShaderSource")
|
||||
@GLstring(string = "source", maxLength = "maxLength")
|
||||
@GLreturn(value = "source", maxLength = "maxLength")
|
||||
void glGetShaderSource2(@GLuint int shader, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("source_length, 0") IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer source);
|
||||
|
@ -369,7 +379,7 @@ public interface GL20 {
|
|||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveAttrib")
|
||||
@GLstring(string = "name", maxLength = "maxLength")
|
||||
@GLreturn(value = "name", maxLength = "maxLength")
|
||||
void glGetActiveAttrib2(@GLuint int program, @GLuint int index, @GLsizei int maxLength,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @Check("1") IntBuffer size,
|
||||
|
@ -431,6 +441,9 @@ public interface GL20 {
|
|||
|
||||
void glDrawBuffers(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers);
|
||||
|
||||
@Alternate("glDrawBuffers")
|
||||
void glDrawBuffers(@Constant("1") @GLsizei int size, @Constant(value = "APIUtils.getBufferInt().put(0, buffer), 0", keepParam = true) int buffer);
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// ----------------------[ ARB_point_sprite ]----------------------
|
||||
// ----------------------------------------------------------------
|
||||
|
|
|
@ -488,21 +488,40 @@ public interface GL30 {
|
|||
|
||||
void glDeleteRenderbuffers(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glDeleteRenderbuffers")
|
||||
void glDeleteRenderbuffers(@Constant("1") int n, @Constant(value = "APIUtils.getBufferInt().put(0, renderbuffer), 0", keepParam = true) int renderbuffer);
|
||||
|
||||
void glGenRenderbuffers(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
@Alternate("glGenRenderbuffers")
|
||||
@GLreturn("renderbuffers")
|
||||
void glGenRenderbuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers);
|
||||
|
||||
void glRenderbufferStorage(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetRenderbufferParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetRenderbufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
boolean glIsFramebuffer(@GLuint int framebuffer);
|
||||
|
||||
void glBindFramebuffer(@GLenum int target, @GLuint int framebuffer);
|
||||
|
||||
void glDeleteFramebuffers(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glDeleteFramebuffers")
|
||||
void glDeleteFramebuffers(@Constant("1") int n, @Constant(value = "APIUtils.getBufferInt().put(0, framebuffer), 0", keepParam = true) int framebuffer);
|
||||
|
||||
void glGenFramebuffers(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@Alternate("glGenFramebuffers")
|
||||
@GLreturn("framebuffers")
|
||||
void glGenFramebuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers);
|
||||
|
||||
@GLenum
|
||||
int glCheckFramebufferStatus(@GLenum int target);
|
||||
|
||||
|
@ -517,6 +536,11 @@ public interface GL30 {
|
|||
@StripPostfix("params")
|
||||
void glGetFramebufferAttachmentParameteriv(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetFramebufferAttachmentParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetFramebufferAttachmentParameteriv2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
void glGenerateMipmap(@GLenum int target);
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
@ -656,15 +680,33 @@ public interface GL30 {
|
|||
@StripPostfix("params")
|
||||
void glTexParameterIiv(@GLenum int target, @GLenum int pname, @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glTexParameterIiv")
|
||||
@StripPostfix(value = "param", postfix = "v")
|
||||
void glTexParameterIiv(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glTexParameterIuiv(@GLenum int target, @GLenum int pname, @Check("4") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glTexParameterIuiv")
|
||||
@StripPostfix(value = "param", postfix = "v")
|
||||
void glTexParameterIuiv(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtils.getBufferInt().put(0, param), 0", keepParam = true) int param);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexParameterIiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameterIiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameterIiv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetTexParameterIuiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetTexParameterIuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetTexParameterIuiv2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// ----------------------[ EXT_texture_array ]----------------------
|
||||
// -----------------------------------------------------------------
|
||||
|
@ -760,9 +802,19 @@ public interface GL30 {
|
|||
@StripPostfix(value = "data", hasPostfix = false)
|
||||
void glGetBooleani_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data);
|
||||
|
||||
@Alternate("glGetBooleani_v")
|
||||
@GLreturn("data")
|
||||
@StripPostfix(value = "data", hasPostfix = false)
|
||||
void glGetBooleani_v2(@GLenum int value, @GLuint int index, @OutParameter @GLboolean ByteBuffer data);
|
||||
|
||||
@StripPostfix("data")
|
||||
void glGetIntegeri_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data);
|
||||
|
||||
@Alternate("glGetIntegeri_v")
|
||||
@GLreturn("data")
|
||||
@StripPostfix("data")
|
||||
void glGetIntegeri_v2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data);
|
||||
|
||||
void glEnablei(@GLenum int target, @GLuint int index);
|
||||
|
||||
void glDisablei(@GLenum int target, @GLuint int index);
|
||||
|
@ -909,15 +961,15 @@ public interface GL30 {
|
|||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@GLchar ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetTransformFeedbackVarying")
|
||||
@GLstring(string = "name", maxLength = "bufSize")
|
||||
@GLreturn(value = "name", maxLength = "bufSize")
|
||||
void glGetTransformFeedbackVarying2(@GLuint int program, @GLuint int index, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
@OutParameter @GLenum @Check("1") IntBuffer type,
|
||||
@GLchar ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// ----------------------[ ARB_vertex_array_object ]----------------------
|
||||
|
@ -933,8 +985,15 @@ public interface GL30 {
|
|||
|
||||
void glDeleteVertexArrays(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays);
|
||||
|
||||
@Alternate("glDeleteVertexArrays")
|
||||
void glDeleteVertexArrays(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, array), 0", keepParam = true) int array);
|
||||
|
||||
void glGenVertexArrays(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays);
|
||||
|
||||
@Alternate("glGenVertexArrays")
|
||||
@GLreturn("arrays")
|
||||
void glGenVertexArrays2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays);
|
||||
|
||||
boolean glIsVertexArray(@GLuint int array);
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
|
|
@ -243,17 +243,26 @@ public interface GL31 {
|
|||
@StripPostfix("params")
|
||||
void glGetActiveUniformsiv(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount,
|
||||
@Const @GLuint IntBuffer uniformIndices,
|
||||
@GLenum int pname, @Check("uniformIndices.remaining()") @GLint IntBuffer params);
|
||||
@GLenum int pname,
|
||||
@OutParameter @Check("uniformIndices.remaining()") @GLint IntBuffer params);
|
||||
|
||||
@Alternate("glGetActiveUniformsiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetActiveUniformsiv(@GLuint int program, @Constant("1") @GLsizei int uniformCount,
|
||||
@Constant(value = "APIUtils.getBufferInt().put(0, uniformIndex), 0", keepParam = true) int uniformIndex,
|
||||
@GLenum int pname,
|
||||
@OutParameter @GLint IntBuffer params);
|
||||
|
||||
void glGetActiveUniformName(@GLuint int program, @GLuint int uniformIndex, @AutoSize("uniformName") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@GLchar ByteBuffer uniformName);
|
||||
@OutParameter @GLchar ByteBuffer uniformName);
|
||||
|
||||
@Alternate("glGetActiveUniformName")
|
||||
@GLstring(string = "uniformName", maxLength = "bufSize")
|
||||
@GLreturn(value = "uniformName", maxLength = "bufSize")
|
||||
void glGetActiveUniformName2(@GLuint int program, @GLuint int uniformIndex, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("uniformName_length, 0") IntBuffer length,
|
||||
@GLchar ByteBuffer uniformName);
|
||||
@OutParameter @GLchar ByteBuffer uniformName);
|
||||
|
||||
@GLuint
|
||||
int glGetUniformBlockIndex(@GLuint int program, @Const @NullTerminated @GLchar ByteBuffer uniformBlockName);
|
||||
|
@ -268,13 +277,13 @@ public interface GL31 {
|
|||
|
||||
void glGetActiveUniformBlockName(@GLuint int program, @GLuint int uniformBlockIndex, @AutoSize("uniformBlockName") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@GLchar ByteBuffer uniformBlockName);
|
||||
@OutParameter @GLchar ByteBuffer uniformBlockName);
|
||||
|
||||
@Alternate("glGetActiveUniformBlockName")
|
||||
@GLstring(string = "uniformBlockName", maxLength = "bufSize")
|
||||
@GLreturn(value = "uniformBlockName", maxLength = "bufSize")
|
||||
void glGetActiveUniformBlockName2(@GLuint int program, @GLuint int uniformBlockIndex, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("uniformBlockName_length, 0") IntBuffer length,
|
||||
@GLchar ByteBuffer uniformBlockName);
|
||||
@OutParameter @GLchar ByteBuffer uniformBlockName);
|
||||
|
||||
void glUniformBlockBinding(@GLuint int program, @GLuint int uniformBlockIndex, @GLuint int uniformBlockBinding);
|
||||
|
||||
|
|
|
@ -314,14 +314,30 @@ public interface GL32 {
|
|||
@StripPostfix(value = "data", postfix = "64")
|
||||
void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer data);
|
||||
|
||||
@Alternate("glGetInteger64v")
|
||||
@GLreturn("data")
|
||||
@StripPostfix(value = "data", postfix = "64")
|
||||
void glGetInteger64v2(@GLenum int pname, @OutParameter @GLint64 LongBuffer data);
|
||||
|
||||
@StripPostfix(value = "data", postfix = "64")
|
||||
@Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)")
|
||||
void glGetInteger64i_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLint64 LongBuffer data);
|
||||
|
||||
@Alternate("glGetInteger64i_v")
|
||||
@GLreturn("data")
|
||||
@StripPostfix(value = "data", postfix = "64")
|
||||
@Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)")
|
||||
void glGetInteger64i_v2(@GLenum int value, @GLuint int index, @OutParameter @GLint64 LongBuffer data);
|
||||
|
||||
@StripPostfix("values")
|
||||
void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname,
|
||||
@AutoSize("values") @GLsizei int bufSize,
|
||||
void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length,
|
||||
@OutParameter IntBuffer values);
|
||||
|
||||
@Alternate("glGetSynciv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetSynciv2(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("null, 0") IntBuffer length,
|
||||
@OutParameter IntBuffer values);
|
||||
}
|
|
@ -93,8 +93,15 @@ public interface GL33 {
|
|||
|
||||
void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers);
|
||||
|
||||
@Alternate("glGenSamplers")
|
||||
@GLreturn("samplers")
|
||||
void glGenSamplers2(@Constant("1") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers);
|
||||
|
||||
void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers);
|
||||
|
||||
@Alternate("glDeleteSamplers")
|
||||
void glDeleteSamplers(@Constant("1") @GLsizei int count, @Constant(value = "APIUtils.getBufferInt().put(0, sampler), 0", keepParam = true) int sampler);
|
||||
|
||||
boolean glIsSampler(@GLuint int sampler);
|
||||
|
||||
void glBindSampler(@GLenum int unit, @GLuint int sampler);
|
||||
|
@ -118,14 +125,34 @@ public interface GL33 {
|
|||
@StripPostfix("params")
|
||||
void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameteriv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameteriv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterfv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterfv2(@GLuint int sampler, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterIiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterIiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetSamplerParameterIfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params);
|
||||
void glGetSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params);
|
||||
|
||||
@Alternate("glGetSamplerParameterIuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetSamplerParameterIuiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// ----------------------[ ARB_texture_rgb10_a2ui ]----------------------
|
||||
|
@ -180,9 +207,19 @@ public interface GL33 {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjecti64v")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjecti64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64 LongBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64 LongBuffer params);
|
||||
|
||||
@Alternate("glGetQueryObjectui64v")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryObjectui64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64 LongBuffer params);
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// ----------------------[ ARB_instanced_arrays ]----------------------
|
||||
// --------------------------------------------------------------------
|
||||
|
|
|
@ -215,17 +215,33 @@ public interface GL40 {
|
|||
|
||||
@StripPostfix("values")
|
||||
void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
|
||||
@Check("1") @OutParameter IntBuffer values);
|
||||
@OutParameter @Check("1") IntBuffer values);
|
||||
|
||||
void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index,
|
||||
@AutoSize("name") @GLsizei int bufsize,
|
||||
@Alternate("glGetActiveSubroutineUniformiv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetActiveSubroutineUniformiv2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname,
|
||||
@OutParameter IntBuffer values);
|
||||
|
||||
void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length,
|
||||
@OutParameter ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index,
|
||||
@AutoSize("name") @GLsizei int bufsize,
|
||||
@Alternate("glGetActiveSubroutineUniformName")
|
||||
@GLreturn(value = "name", maxLength = "bufsize")
|
||||
void glGetActiveSubroutineUniformName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize,
|
||||
@OutParameter @Constant("name_length, 0") @GLsizei IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize,
|
||||
@OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length,
|
||||
@OutParameter ByteBuffer name);
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveSubroutineName")
|
||||
@GLreturn(value = "name", maxLength = "bufsize")
|
||||
void glGetActiveSubroutineName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize,
|
||||
@OutParameter @Constant("name_length, 0") @GLsizei IntBuffer length,
|
||||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@StripPostfix("indices")
|
||||
void glUniformSubroutinesuiv(@GLenum int shadertype, @AutoSize("indices") @GLsizei int count, @Const @GLuint IntBuffer indices);
|
||||
|
@ -233,9 +249,19 @@ public interface GL40 {
|
|||
@StripPostfix("params")
|
||||
void glGetUniformSubroutineuiv(@GLenum int shadertype, int location, @Check("1") @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetUniformSubroutineuiv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetUniformSubroutineuiv2(@GLenum int shadertype, int location, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@StripPostfix("values")
|
||||
void glGetProgramStageiv(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @Check("1") @OutParameter IntBuffer values);
|
||||
|
||||
@Alternate("glGetProgramStageiv")
|
||||
@GLreturn("values")
|
||||
@StripPostfix("values")
|
||||
void glGetProgramStageiv2(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @OutParameter IntBuffer values);
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// ----------------------[ ARB_tessellation_shader ]----------------------
|
||||
// -----------------------------------------------------------------------
|
||||
|
@ -374,7 +400,14 @@ public interface GL40 {
|
|||
|
||||
void glDeleteTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids);
|
||||
|
||||
void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids);
|
||||
@Alternate("glDeleteTransformFeedbacks")
|
||||
void glDeleteTransformFeedbacks(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, id), 0", keepParam = true) int id);
|
||||
|
||||
void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glGenTransformFeedbacks")
|
||||
@GLreturn("ids")
|
||||
void glGenTransformFeedbacks2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
boolean glIsTransformFeedback(@GLuint int id);
|
||||
|
||||
|
@ -403,4 +436,9 @@ public interface GL40 {
|
|||
@StripPostfix("params")
|
||||
void glGetQueryIndexediv(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetQueryIndexediv")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetQueryIndexediv2(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
}
|
|
@ -31,9 +31,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.util.generator.AutoSize;
|
||||
import org.lwjgl.util.generator.Const;
|
||||
import org.lwjgl.util.generator.GLsizei;
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
|
@ -41,4 +39,7 @@ public interface GREMEDY_string_marker {
|
|||
|
||||
void glStringMarkerGREMEDY(@AutoSize("string") @GLsizei int len, @Const ByteBuffer string);
|
||||
|
||||
@Alternate("glStringMarkerGREMEDY")
|
||||
void glStringMarkerGREMEDY(@Constant("string.length()") @GLsizei int len, CharSequence string);
|
||||
|
||||
}
|
|
@ -78,9 +78,19 @@ public interface NV_explicit_multisample {
|
|||
@StripPostfix(value = "data", extension = "EXT")
|
||||
void glGetBooleanIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") @GLboolean ByteBuffer data);
|
||||
|
||||
@Alternate("glGetBooleanIndexedvEXT")
|
||||
@GLreturn("data")
|
||||
@StripPostfix(value = "data", extension = "EXT")
|
||||
void glGetBooleanIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter @GLboolean ByteBuffer data);
|
||||
|
||||
@StripPostfix(value = "data", extension = "EXT")
|
||||
void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") IntBuffer data);
|
||||
|
||||
@Alternate("glGetIntegerIndexedvEXT")
|
||||
@GLreturn("data")
|
||||
@StripPostfix(value = "data", extension = "EXT")
|
||||
void glGetIntegerIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter IntBuffer data);
|
||||
|
||||
@StripPostfix("val")
|
||||
void glGetMultisamplefvNV(@GLenum int pname, @GLuint int index, @OutParameter @Check("2") FloatBuffer val);
|
||||
|
||||
|
|
|
@ -33,9 +33,10 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public interface NV_occlusion_query {
|
||||
|
||||
int GL_OCCLUSION_TEST_HP = 0x8165;
|
||||
int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
|
||||
/* HP_occlusion_test */
|
||||
|
@ -46,8 +47,15 @@ public interface NV_occlusion_query {
|
|||
|
||||
void glGenOcclusionQueriesNV(@AutoSize("piIDs") @GLsizei int n, @OutParameter @GLuint IntBuffer piIDs);
|
||||
|
||||
@Alternate("glGenOcclusionQueriesNV")
|
||||
@GLreturn("piIDs")
|
||||
void glGenOcclusionQueriesNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer piIDs);
|
||||
|
||||
void glDeleteOcclusionQueriesNV(@AutoSize("piIDs") @GLsizei int n, @Const @GLuint IntBuffer piIDs);
|
||||
|
||||
@Alternate("glDeleteOcclusionQueriesNV")
|
||||
void glDeleteOcclusionQueriesNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, piID), 0", keepParam = true) int piID);
|
||||
|
||||
boolean glIsOcclusionQueryNV(@GLuint int id);
|
||||
|
||||
void glBeginOcclusionQueryNV(@GLuint int id);
|
||||
|
@ -57,6 +65,16 @@ public interface NV_occlusion_query {
|
|||
@StripPostfix("params")
|
||||
void glGetOcclusionQueryuivNV(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params);
|
||||
|
||||
@Alternate("glGetOcclusionQueryuivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetOcclusionQueryuivNV2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetOcclusionQueryivNV(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params);
|
||||
|
||||
@Alternate("glGetOcclusionQueryivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetOcclusionQueryivNV2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
}
|
||||
|
|
|
@ -33,57 +33,72 @@ package org.lwjgl.opengl;
|
|||
|
||||
import org.lwjgl.util.generator.*;
|
||||
|
||||
import java.nio.*;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@Extension(postfix = "NV", isFinal = false)
|
||||
public interface NV_program {
|
||||
|
||||
/**
|
||||
Accepted by the <pname> parameter of GetProgramivNV:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetProgramivNV: */
|
||||
int GL_PROGRAM_TARGET_NV = 0x8646;
|
||||
int GL_PROGRAM_LENGTH_NV = 0x8627;
|
||||
int GL_PROGRAM_RESIDENT_NV = 0x8647;
|
||||
|
||||
/**
|
||||
Accepted by the <pname> parameter of GetProgramStringNV:
|
||||
*/
|
||||
/** Accepted by the <pname> parameter of GetProgramStringNV: */
|
||||
int GL_PROGRAM_STRING_NV = 0x8628;
|
||||
|
||||
/**
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
* GetFloatv, and GetDoublev:
|
||||
*/
|
||||
int GL_PROGRAM_ERROR_POSITION_NV = 0x864B;
|
||||
|
||||
/**
|
||||
Accepted by the <name> parameter of GetString:
|
||||
*/
|
||||
/** Accepted by the <name> parameter of GetString: */
|
||||
int GL_PROGRAM_ERROR_STRING_NV = 0x8874;
|
||||
|
||||
void glLoadProgramNV(@GLenum int target, @GLuint int programID, @AutoSize("string") @GLsizei int length, @Const @GLubyte Buffer string);
|
||||
|
||||
@Alternate("glLoadProgramNV")
|
||||
void glLoadProgramNV(@GLenum int target, @GLuint int programID, @Constant("string.length()") @GLsizei int length, CharSequence string);
|
||||
|
||||
void glBindProgramNV(@GLenum int target, @GLuint int programID);
|
||||
|
||||
void glDeleteProgramsNV(@AutoSize("programs") @GLsizei int n, @Const @GLuint IntBuffer programs);
|
||||
|
||||
@Alternate("glDeleteProgramsNV")
|
||||
void glDeleteProgramsNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, program), 0", keepParam = true) int program);
|
||||
|
||||
void glGenProgramsNV(@AutoSize("programs") @GLsizei int n, @OutParameter @GLuint IntBuffer programs);
|
||||
|
||||
@Alternate("glGenProgramsNV")
|
||||
@GLreturn("programs")
|
||||
void glGenProgramsNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer programs);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetProgramivNV(@GLuint int programID, @GLenum int parameterName, @OutParameter @Check @GLint IntBuffer params);
|
||||
|
||||
@Alternate("glGetProgramivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetProgramivNV2(@GLuint int programID, @GLenum int parameterName, @OutParameter @GLint IntBuffer params);
|
||||
|
||||
void glGetProgramStringNV(@GLuint int programID, @GLenum int parameterName, @OutParameter @Check @GLubyte Buffer paramString);
|
||||
|
||||
@Alternate("glGetProgramStringNV")
|
||||
@Code("\t\tint programLength = glGetProgramNV(programID, GL_PROGRAM_LENGTH_NV);")
|
||||
@GLreturn(value="paramString", maxLength = "programLength", forceMaxLength = true)
|
||||
void glGetProgramStringNV2(@GLuint int programID, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString);
|
||||
|
||||
boolean glIsProgramNV(@GLuint int programID);
|
||||
|
||||
@Code(" if (programIDs.remaining() != programResidences.remaining())\n" +
|
||||
" throw new IllegalArgumentException(\"programIDs.remaining() != programResidences.remaining()\");")
|
||||
boolean glAreProgramsResidentNV(@AutoSize("programIDs") @GLsizei int n,
|
||||
@Const
|
||||
@GLuint IntBuffer programIDs,
|
||||
@Check
|
||||
@GLboolean ByteBuffer programResidences);
|
||||
@Const @GLuint IntBuffer programIDs,
|
||||
@OutParameter @GLboolean @Check("programIDs.remaining()") ByteBuffer programResidences);
|
||||
|
||||
void glRequestResidentProgramsNV(@AutoSize("programIDs") @GLsizei int n, @GLuint IntBuffer programIDs);
|
||||
|
||||
@Alternate("glRequestResidentProgramsNV")
|
||||
void glRequestResidentProgramsNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, programID), 0", keepParam = true) int programID);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,18 +107,48 @@ public interface NV_register_combiners {
|
|||
@StripPostfix("params")
|
||||
void glGetCombinerInputParameterfvNV(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetCombinerInputParameterfvNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetCombinerInputParameterfvNV2(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetCombinerInputParameterivNV(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetCombinerInputParameterivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetCombinerInputParameterivNV2(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetCombinerOutputParameterfvNV(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetCombinerOutputParameterfvNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetCombinerOutputParameterfvNV2(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetCombinerOutputParameterivNV(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetCombinerOutputParameterivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetCombinerOutputParameterivNV2(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetFinalCombinerInputParameterfvNV(@GLenum int variable, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
|
||||
|
||||
@Alternate("glGetFinalCombinerInputParameterfvNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetFinalCombinerInputParameterfvNV2(@GLenum int variable, @GLenum int pname, @OutParameter FloatBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetFinalCombinerInputParameterivNV(@GLenum int variable, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
|
||||
|
||||
@Alternate("glGetFinalCombinerInputParameterivNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix(value = "params", postfix = "v")
|
||||
void glGetFinalCombinerInputParameterivNV2(@GLenum int variable, @GLenum int pname, @OutParameter IntBuffer params);
|
||||
}
|
||||
|
|
|
@ -64,12 +64,27 @@ public interface NV_shader_buffer_load {
|
|||
@StripPostfix("params")
|
||||
void glGetBufferParameterui64vNV(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params);
|
||||
|
||||
@Alternate("glGetBufferParameterui64vNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetBufferParameterui64vNV2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params);
|
||||
|
||||
@StripPostfix("params")
|
||||
void glGetNamedBufferParameterui64vNV(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params);
|
||||
|
||||
@Alternate("glGetNamedBufferParameterui64vNV")
|
||||
@GLreturn("params")
|
||||
@StripPostfix("params")
|
||||
void glGetNamedBufferParameterui64vNV2(@GLuint int buffer, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params);
|
||||
|
||||
@StripPostfix("result")
|
||||
void glGetIntegerui64vNV(@GLenum int value, @OutParameter @Check("1") @GLuint64EXT LongBuffer result);
|
||||
|
||||
@Alternate("glGetIntegerui64vNV")
|
||||
@GLreturn("result")
|
||||
@StripPostfix("result")
|
||||
void glGetIntegerui64vNV2(@GLenum int value, @OutParameter @GLuint64EXT LongBuffer result);
|
||||
|
||||
void glUniformui64NV(int location, @GLuint64EXT long value);
|
||||
|
||||
@StripPostfix("value")
|
||||
|
|
|
@ -138,7 +138,7 @@ public interface NV_transform_feedback {
|
|||
@OutParameter @GLchar ByteBuffer name);
|
||||
|
||||
@Alternate("glGetActiveVaryingNV")
|
||||
@GLstring(string = "name", maxLength = "bufSize")
|
||||
@GLreturn(value = "name", maxLength = "bufSize")
|
||||
void glGetActiveVaryingNV2(@GLuint int program, @GLuint int index, @GLsizei int bufSize,
|
||||
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
|
||||
@OutParameter @GLsizei @Check("1") IntBuffer size,
|
||||
|
@ -152,4 +152,8 @@ public interface NV_transform_feedback {
|
|||
|
||||
void glGetTransformFeedbackVaryingNV(@GLuint int program, @GLuint int index, @OutParameter @Check("1") IntBuffer location);
|
||||
|
||||
@Alternate("glGetTransformFeedbackVaryingNV")
|
||||
@GLreturn("location")
|
||||
void glGetTransformFeedbackVaryingNV2(@GLuint int program, @GLuint int index, @OutParameter IntBuffer location);
|
||||
|
||||
}
|
||||
|
|
|
@ -53,8 +53,15 @@ public interface NV_transform_feedback2 {
|
|||
|
||||
void glDeleteTransformFeedbacksNV(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glDeleteTransformFeedbacksNV")
|
||||
void glDeleteTransformFeedbacksNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, id), 0", keepParam = true) int id);
|
||||
|
||||
void glGenTransformFeedbacksNV(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
@Alternate("glGenTransformFeedbacksNV")
|
||||
@GLreturn("ids")
|
||||
void glGenTransformFeedbacksNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids);
|
||||
|
||||
boolean glIsTransformFeedbackNV(@GLuint int id);
|
||||
|
||||
void glPauseTransformFeedbackNV();
|
||||
|
|
|
@ -103,4 +103,9 @@ public interface NV_vertex_buffer_unified_memory {
|
|||
@StripPostfix("result")
|
||||
void glGetIntegerui64i_vNV(@GLenum int value, @GLuint int index, @OutParameter @Check("1") @GLuint64EXT LongBuffer result);
|
||||
|
||||
@Alternate("glGetIntegerui64i_vNV")
|
||||
@GLreturn("result")
|
||||
@StripPostfix("result")
|
||||
void glGetIntegerui64i_vNV2(@GLenum int value, @GLuint int index, @OutParameter @GLuint64EXT LongBuffer result);
|
||||
|
||||
}
|
Loading…
Reference in New Issue