Code cleanup

This commit is contained in:
Ioannis Tsakpinis 2004-11-25 22:20:45 +00:00
parent f86b00c9ba
commit 3041c0494d
113 changed files with 3414 additions and 4115 deletions

View File

@ -147,7 +147,7 @@ public class BufferChecks {
* The buffer to check
* @param size
* The minimum buffer size
* @throws BufferOverflowException
* @throws IllegalArgumentException
*/
private static void checkBufferSize(Buffer buf, int size) {
if (buf.remaining() < size) {
@ -188,7 +188,7 @@ public class BufferChecks {
*
* @param buf
* The buffer to check
* @throws BufferOverflowException
* @throws IllegalArgumentException
*/
public static void checkBuffer(ByteBuffer buf) {
checkBuffer(buf, DEFAULT_BUFFER_SIZE);

View File

@ -48,7 +48,7 @@ public interface PlatformAdapter {
* @param title
* @param message
*/
public void alert(String title, String message);
void alert(String title, String message);
/**
* Get the contents of the system clipboard. The system might not have a clipboard
@ -56,5 +56,5 @@ public interface PlatformAdapter {
* Otherwise we return a String, which may be the empty string "".
* @return a String, or null if there is no system clipboard.
*/
public String getClipboard();
String getClipboard();
}

View File

@ -48,6 +48,7 @@ import org.lwjgl.opengl.Display;
* @version $Revision$
*/
public final class Sys {
public static final String VERSION = "0.93";
/** Low process priority. @see #setProcessPriority() */
@ -90,7 +91,7 @@ public final class Sys {
*/
public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.Sys.debug");
private static boolean initialized = false;
private static boolean initialized;
static {
initialize();

View File

@ -197,17 +197,18 @@ public class Keyboard {
public static final int STATE_OFF = 1;
public static final int STATE_UNKNOWN = 2;
public final static int KEYBOARD_SIZE = 256;
public static final int KEYBOARD_SIZE = 256;
/** Buffer size in events */
private final static int BUFFER_SIZE = 50;
private static final int BUFFER_SIZE = 50;
/** Event size in elements */
private final static int EVENT_SIZE = 3;
private static final int EVENT_SIZE = 3;
/** Key names */
private static final String[] keyName = new String[255];
private static final Map keyMap = new HashMap(253);
private static int counter = 0;
private static int counter;
static {
// Use reflection to find out key names
Field[] field = Keyboard.class.getFields();

View File

@ -60,13 +60,13 @@ import org.lwjgl.opengl.Display;
public class Mouse {
/** 1 bit transparency for native cursor */
public final static int CURSOR_ONE_BIT_TRANSPARENCY = 1;
public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1;
/** 8 bit alhpa native cursor */
public final static int CURSOR_8_BIT_ALPHA = 2;
public static final int CURSOR_8_BIT_ALPHA = 2;
/** animation native cursor */
public final static int CURSOR_ANIMATION = 4;
public static final int CURSOR_ANIMATION = 4;
/** Mouse constraint */
private static int width, height;
@ -99,7 +99,7 @@ public class Mouse {
private static int buttonCount = -1;
/** Does this mouse support a scroll wheel */
private static boolean hasWheel = false;
private static boolean hasWheel;
/** The current native cursor, if any */
private static Cursor currentCursor;
@ -114,7 +114,7 @@ public class Mouse {
private static boolean initialized;
/** The mouse button events from the last read */
private static IntBuffer readBuffer = null;
private static IntBuffer readBuffer;
/** The current mouse event button being examined */
private static int eventButton;
@ -131,9 +131,9 @@ public class Mouse {
private static int event_y;
/** Buffer size in events */
private final static int BUFFER_SIZE = 50;
private static final int BUFFER_SIZE = 50;
/** Event size in elements */
private final static int EVENT_SIZE = 5;
private static final int EVENT_SIZE = 5;
private static boolean isGrabbed;

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public abstract class ARBBufferObject {
/*
* Accepted by the <usage> parameter of BufferDataARB:
*/
@ -80,11 +81,14 @@ public abstract class ARBBufferObject {
case ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB:
VBOTracker.getVBOArrayStack().setState(buffer);
break;
default: throw new IllegalArgumentException("Unsupported VBO target " + target);
default:
throw new IllegalArgumentException("Unsupported VBO target " + target);
}
nglBindBufferARB(target, buffer);
}
private static native void nglBindBufferARB(int target, int buffer);
public static void glDeleteBuffersARB(IntBuffer buffers) {
for ( int i = buffers.position(); i < buffers.limit(); i++ ) {
int buffer_handle = buffers.get(i);
@ -96,87 +100,104 @@ public abstract class ARBBufferObject {
BufferChecks.checkDirect(buffers);
nglDeleteBuffersARB(buffers.remaining(), buffers, buffers.position());
}
private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_offset);
public static void glGenBuffersARB(IntBuffer buffers) {
BufferChecks.checkDirect(buffers);
nglGenBuffersARB(buffers.remaining(), buffers, buffers.position());
}
private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_offset);
public static native boolean glIsBufferARB(int buffer);
public static void glBufferDataARB(int target, int size, ByteBuffer data, int usage) {
BufferChecks.checkDirectOrNull(data);
nglBufferDataARB(target, data != null ? data.remaining() : size, data, data != null ? data.position() : 0, usage);
}
public static void glBufferDataARB(int target, int size, ShortBuffer data, int usage) {
BufferChecks.checkDirectOrNull(data);
nglBufferDataARB(target, data != null ? data.remaining() << 1 : size, data, data != null ? data.position() << 1 : 0, usage);
}
public static void glBufferDataARB(int target, int size, FloatBuffer data, int usage) {
BufferChecks.checkDirectOrNull(data);
nglBufferDataARB(target, data != null ? data.remaining() << 2 : size, data, data != null ? data.position() << 2 : 0, usage);
}
public static void glBufferDataARB(int target, int size, IntBuffer data, int usage) {
BufferChecks.checkDirectOrNull(data);
nglBufferDataARB(target, data != null ? data.remaining() << 2 : size, data, data != null ? data.position() << 2 : 0, usage);
}
private static native void nglBufferDataARB(int target, int size, Buffer data, int data_offset, int usage);
public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglBufferSubDataARB(target, offset, data.remaining(), data, data.position());
}
public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglBufferSubDataARB(target, offset, data.remaining() << 1, data, data.position() << 1);
}
public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglBufferSubDataARB(target, offset, data.remaining() << 2, data, data.position() << 2);
}
public static void glBufferSubDataARB(int target, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
nglBufferSubDataARB(target, offset, data.remaining() << 2, data, data.position() << 2);
}
private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset);
public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglGetBufferSubDataARB(target, offset, data.remaining(), data, data.position());
}
public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglGetBufferSubDataARB(target, offset, data.remaining() << 1, data, data.position() << 1);
}
public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) {
BufferChecks.checkDirect(data);
nglGetBufferSubDataARB(target, offset, data.remaining() << 2, data, data.position() << 2);
}
public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglGetBufferSubDataARB(target, offset, data.remaining() << 2, data, data.position() << 2);
}
private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset);
/**
* glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in
* which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null,
* it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created.
* That way, an application will normally use glMapBufferARB like this:
*
* ByteBuffer mapped_buffer;
* mapped_buffer = glMapBufferARB(..., ..., ..., null);
* ...
* // Another map on the same buffer
* mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer);
* glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferARB like this:
* <p/>
* ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer);
*
* @param size The size of the buffer area.
* @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and
* no new buffer will be created. In that case, size is ignored.
* @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored.
*
* @return A ByteBuffer representing the mapped buffer memory.
*/
public static native ByteBuffer glMapBufferARB(int target, int access, int size, ByteBuffer oldBuffer);
public static native boolean glUnmapBufferARB(int target);
public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglGetBufferParameterivARB(target, pname, params, params.position());
}
private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_offset);
public static native ByteBuffer glGetBufferPointerARB(int target, int pname, int size);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBDepthTexture {
/*
* Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D,
* CopyTexImage1D and CopyTexImage2D:

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBFragmentProgram extends ARBProgram {
/*
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
* <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,

View File

@ -43,7 +43,7 @@ import org.lwjgl.LWJGLException;
/**
* $Id$
*
* <p/>
* The GL12 imaging subset extension.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
@ -51,6 +51,7 @@ import org.lwjgl.LWJGLException;
*/
public final class ARBImaging {
public static final int GL_CONSTANT_COLOR = 0x8001;
public static final int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
public static final int GL_CONSTANT_ALPHA = 0x8003;
@ -136,193 +137,264 @@ public final class ARBImaging {
BufferChecks.checkBuffer(data, 256);
nglColorTable(target, internalFormat, width, format, type, data, data.position());
}
public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) {
BufferChecks.checkBuffer(data, 256);
nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2);
}
private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_offset);
public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) {
BufferChecks.checkBuffer(data, 256);
nglColorSubTable(target, start, count, format, type, data, data.position());
}
public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) {
BufferChecks.checkBuffer(data, 256);
nglColorSubTable(target, start, count, format, type, data, data.position() << 2);
}
private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_offset);
public static void glColorTableParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglColorTableParameteriv(target, pname, params, params.position());
}
private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int data_offset);
public static void glColorTableParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglColorTableParameterfv(target, pname, params, params.position());
}
private static native void nglColorTableParameterfv(int target, int pname, FloatBuffer params, int data_offset);
public static native void glCopyColorSubTable(int target, int start, int x, int y, int width);
public static native void glCopyColorTable(int target, int internalformat, int x, int y, int width);
public static void glGetColorTable(int target, int format, int type, ByteBuffer data) {
BufferChecks.checkBuffer(data, 256);
nglGetColorTable(target, format, type, data, data.position());
}
public static void glGetColorTable(int target, int format, int type, FloatBuffer data) {
BufferChecks.checkBuffer(data, 256);
nglGetColorTable(target, format, type, data, data.position());
}
private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_offset);
public static void glGetColorTableParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglGetColorTableParameteriv(target, pname, params, params.position());
}
private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_offset);
public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglGetColorTableParameterfv(target, pname, params, params.position());
}
private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_offset);
public static native void glBlendEquation(int mode);
public static native void glBlendColor(float red, float green, float blue, float alpha);
public static native void glHistogram(int target, int width, int internalformat, boolean sink);
public static native void glResetHistogram(int target);
public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) {
BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position());
}
public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) {
BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 1);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) {
BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 2);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) {
BufferChecks.checkBuffer(values, 256);
nglGetHistogram(target, reset, format, type, values, values.position() << 2);
}
private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_offset);
public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params, 256);
nglGetHistogramParameterfv(target, pname, params, params.position());
}
private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_offset);
public static void glGetHistogramParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglGetHistogramParameteriv(target, pname, params, params.position());
}
private static native void nglGetHistogramParameteriv(int target, int pname, IntBuffer params, int params_offset);
public static native void glMinmax(int target, int internalformat, boolean sink);
public static native void glResetMinmax(int target);
public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) {
BufferChecks.checkBuffer(values);
nglGetMinmax(target, reset, format, types, values, values.position());
}
public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) {
BufferChecks.checkBuffer(values);
nglGetMinmax(target, reset, format, types, values, values.position() << 1);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) {
BufferChecks.checkBuffer(values);
nglGetMinmax(target, reset, format, types, values, values.position() << 2);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) {
BufferChecks.checkBuffer(values);
nglGetMinmax(target, reset, format, types, values, values.position() << 2);
}
private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_offset);
public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglGetMinmaxParameterfv(target, pname, params, params.position());
}
private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_offset);
public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglGetMinmaxParameteriv(target, pname, params, params.position());
}
private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_offset);
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1));
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position());
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 1);
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position());
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2);
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position());
}
public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2);
nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position());
}
private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_offset);
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1));
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position());
}
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 1);
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1);
}
public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) {
BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 2);
nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2);
}
private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_offset);
public static native void glConvolutionParameterf(int target, int pname, float params);
public static void glConvolutionParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglConvolutionParameterfv(target, pname, params, params.position());
}
private static native void nglConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset);
public static native void glConvolutionParameteri(int target, int pname, int params);
public static void glConvolutionParameteriv(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglConvolutionParameteriv(target, pname, params, params.position());
}
private static native void nglConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset);
public static native void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width);
public static native void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height);
public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) {
BufferChecks.checkDirect(image);
// TODO: check buffer size valid
nglGetConvolutionFilter(target, format, type, image, image.position());
}
public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) {
BufferChecks.checkDirect(image);
// TODO: check buffer size valid
nglGetConvolutionFilter(target, format, type, image, image.position() << 1);
}
public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) {
BufferChecks.checkDirect(image);
// TODO: check buffer size valid
nglGetConvolutionFilter(target, format, type, image, image.position() << 2);
}
public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) {
BufferChecks.checkDirect(image);
// TODO: check buffer size valid
nglGetConvolutionFilter(target, format, type, image, image.position() << 2);
}
private static native void nglGetConvolutionFilter(int target, int format, int type, Buffer image, int image_offset);
public static void glGetConvolutionParameter(int target, int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglGetConvolutionParameterfv(target, pname, params, params.position());
}
private static native void nglGetConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset);
public static void glGetConvolutionParameter(int target, int pname, IntBuffer params) {
BufferChecks.checkBuffer(params);
nglGetConvolutionParameteriv(target, pname, params, params.position());
}
private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset);
public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column) {
BufferChecks.checkDirectBuffer(row);
BufferChecks.checkDirectBuffer(column);
// TODO: check buffer size valid
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, BufferUtils.getOffset(row), column, BufferUtils.getOffset(column));
}
private static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset);
public static void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span) {
BufferChecks.checkDirectBuffer(row);
BufferChecks.checkDirectBuffer(column);
@ -330,6 +402,7 @@ public final class ARBImaging {
// TODO: check buffer size valid
nglGetSeparableFilter(target, format, type, row, BufferUtils.getOffset(row), column, BufferUtils.getOffset(column), span, BufferUtils.getOffset(span));
}
private static native void nglGetSeparableFilter(int target, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset, Buffer span, int span_offset);
}

View File

@ -40,6 +40,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBMatrixPalette {
public static final int GL_MATRIX_PALETTE_ARB = 0x8840;
public static final int GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841;
public static final int GL_MAX_PALETTE_MATRICES_ARB = 0x8842;
@ -57,43 +58,52 @@ public final class ARBMatrixPalette {
static native void initNativeStubs() throws LWJGLException;
public static native void glCurrentPaletteMatrixARB(int index);
public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position());
}
public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_SHORT, stride, pPointer, pPointer.position() << 1);
}
public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2);
}
private static native void nglMatrixIndexPointerARB(int size, int type, int stride, Buffer pPointer, int pPointer_offset);
public static void glMatrixIndexPointerARB(int size, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglMatrixIndexPointerARBVBO(size, type, stride, buffer_offset);
}
private static native void nglMatrixIndexPointerARBVBO(int size, int type, int stride, int buffer_offset);
public static void glMatrixIndexuARB(ByteBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
nglMatrixIndexubvARB(pIndices.remaining(), pIndices, pIndices.position());
}
private static native void nglMatrixIndexubvARB(int size, ByteBuffer pIndices, int pIndices_offset);
public static void glMatrixIndexuARB(IntBuffer piIndices) {
BufferChecks.checkDirect(piIndices);
nglMatrixIndexuivARB(piIndices.remaining(), piIndices, piIndices.position());
}
private static native void nglMatrixIndexuivARB(int size, IntBuffer piIndices, int piIndices_offset);
public static void glMatrixIndexuARB(ShortBuffer psIndices) {
BufferChecks.checkDirect(psIndices);
nglMatrixIndexusvARB(psIndices.remaining(), psIndices, psIndices.position());
}
private static native void nglMatrixIndexusvARB(int size, ShortBuffer psIndices, int psIndices_offset);
}

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBMultisample {
public static final int GL_MULTISAMPLE_ARB = 0x809D;
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E;
public static final int GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F;

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBMultitexture {
public static final int GL_TEXTURE0_ARB = 0x84C0;
public static final int GL_TEXTURE1_ARB = 0x84C1;
public static final int GL_TEXTURE2_ARB = 0x84C2;
@ -91,38 +92,15 @@ public final class ARBMultitexture {
public static native void glMultiTexCoord2sARB(int target, short s, short t);
public static native void glMultiTexCoord3fARB(
int target,
float s,
float t,
float r);
public static native void glMultiTexCoord3fARB(int target, float s, float t, float r);
public static native void glMultiTexCoord3iARB(int target, int s, int t, int r);
public static native void glMultiTexCoord3sARB(
int target,
short s,
short t,
short r);
public static native void glMultiTexCoord3sARB(int target, short s, short t, short r);
public static native void glMultiTexCoord4fARB(
int target,
float s,
float t,
float r,
float q);
public static native void glMultiTexCoord4fARB(int target, float s, float t, float r, float q);
public static native void glMultiTexCoord4iARB(
int target,
int s,
int t,
int r,
int q);
public static native void glMultiTexCoord4iARB(int target, int s, int t, int r, int q);
public static native void glMultiTexCoord4sARB(
int target,
short s,
short t,
short r,
short q);
public static native void glMultiTexCoord4sARB(int target, short s, short t, short r, short q);
}

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBOcclusionQuery {
/*
* Accepted by the <target> parameter of BeginQueryARB, EndQueryARB,
* and GetQueryivARB:

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBPointParameters {
public static final int GL_POINT_SIZE_MIN_ARB = 0x8126;
public static final int GL_POINT_SIZE_MAX_ARB = 0x8127;
public static final int GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128;
@ -53,5 +54,6 @@ public final class ARBPointParameters {
BufferChecks.checkBuffer(pfParams);
nglPointParameterfvARB(pname, pfParams, pfParams.position());
}
private static native void nglPointParameterfvARB(int pname, FloatBuffer pfParams, int pfParams_offset);
}

View File

@ -41,6 +41,7 @@ import org.lwjgl.BufferChecks;
import org.lwjgl.LWJGLException;
public abstract class ARBProgram {
/*
* Accepted by the <format> parameter of ProgramStringARB:
*/
@ -160,8 +161,7 @@ public abstract class ARBProgram {
private static native void nglGenProgramsARB(int n, IntBuffer programs, int programsOffset);
// ---------------------------
public static native void glProgramEnvParameter4fARB(
int target,
public static native void glProgramEnvParameter4fARB(int target,
int index,
float x,
float y,
@ -187,8 +187,7 @@ public abstract class ARBProgram {
private static native void nglProgramEnvParameter4fvARB(int target, int index, FloatBuffer params, int paramsOffset);
// ---------------------------
public static native void glProgramLocalParameter4fARB(
int target,
public static native void glProgramLocalParameter4fARB(int target,
int index,
float x,
float y,

View File

@ -40,6 +40,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBShaderObjects {
/*
* Accepted by the <pname> argument of GetHandleARB:
*/
@ -256,8 +257,7 @@ public final class ARBShaderObjects {
nglUniformMatrix2fvARB(location, matrices.remaining() >> 2, transpose, matrices, matrices.position());
}
private static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose,
FloatBuffer matrices, int matricesOffset);
private static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset);
// ---------------------------
// ---------------------------
@ -266,8 +266,7 @@ public final class ARBShaderObjects {
nglUniformMatrix3fvARB(location, matrices.remaining() / (3 * 3), transpose, matrices, matrices.position());
}
private static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose,
FloatBuffer matrices, int matricesOffset);
private static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset);
// ---------------------------
// ---------------------------
@ -276,8 +275,7 @@ public final class ARBShaderObjects {
nglUniformMatrix4fvARB(location, matrices.remaining() >> 4, transpose, matrices, matrices.position());
}
private static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose,
FloatBuffer matrices, int matricesOffset);
private static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset);
// ---------------------------
// ---------------------------
@ -309,9 +307,7 @@ public final class ARBShaderObjects {
}
}
private static native void nglGetInfoLogARB(int obj, int maxLength,
IntBuffer length, int lengthOffset,
ByteBuffer infoLog, int infoLogOffset);
private static native void nglGetInfoLogARB(int obj, int maxLength, IntBuffer length, int lengthOffset, ByteBuffer infoLog, int infoLogOffset);
// ---------------------------
// ---------------------------
@ -326,14 +322,12 @@ public final class ARBShaderObjects {
}
}
private static native void nglGetAttachedObjectsARB(int containerObj, int maxCount,
IntBuffer count, int countOffset, IntBuffer obj, int objOffset);
private static native void nglGetAttachedObjectsARB(int containerObj, int maxCount, IntBuffer count, int countOffset, IntBuffer obj, int objOffset);
// ---------------------------
// ---------------------------
/**
* Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a
* <b>null-terminated</b> string.
* Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a <b>null-terminated</b> string.
*
* @param programObj
* @param name
@ -349,8 +343,7 @@ public final class ARBShaderObjects {
// ---------------------------
// ---------------------------
public static void glGetActiveUniformARB(int programObj, int index,
IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
public static void glGetActiveUniformARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
if ( size.remaining() == 0 )
throw new BufferOverflowException();
@ -358,22 +351,16 @@ public final class ARBShaderObjects {
throw new BufferOverflowException();
if ( length == null )
nglGetActiveUniformARB(programObj, index, name.remaining(), null, -1,
size, size.position(), type, type.position(), name, name.position());
nglGetActiveUniformARB(programObj, index, name.remaining(), null, -1, size, size.position(), type, type.position(), name, name.position());
else {
if ( length.remaining() == 0 )
throw new BufferOverflowException();
nglGetActiveUniformARB(programObj, index, name.remaining(), length, length.position(),
size, size.position(), type, type.position(), name, name.position());
nglGetActiveUniformARB(programObj, index, name.remaining(), length, length.position(), size, size.position(), type, type.position(), name, name.position());
}
}
private static native void nglGetActiveUniformARB(int programObj, int index, int maxLength,
IntBuffer length, int lengthOffset,
IntBuffer size, int sizeOffset,
IntBuffer type, int typeOffset,
ByteBuffer name, int nameOffset);
private static native void nglGetActiveUniformARB(int programObj, int index, int maxLength, IntBuffer length, int lengthOffset, IntBuffer size, int sizeOffset, IntBuffer type, int typeOffset, ByteBuffer name, int nameOffset);
// ---------------------------
// ---------------------------
@ -401,8 +388,7 @@ public final class ARBShaderObjects {
}
}
private static native void nglGetShaderSourceARB(int obj, int maxLength,
IntBuffer length, int lengthOffset, ByteBuffer source, int sourceOffset);
private static native void nglGetShaderSourceARB(int obj, int maxLength, IntBuffer length, int lengthOffset, ByteBuffer source, int sourceOffset);
// ---------------------------
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBShadingLanguage100 {
/*
* Accepted by the <name> parameter of GetString:
*/

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBShadow {
public static final int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C;
public static final int GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D;
public static final int GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBShadowAmbient {
public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF;
private ARBShadowAmbient() {

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBTextureBorderClamp {
public static final int GL_CLAMP_TO_BORDER_ARB = 0x812D;
private ARBTextureBorderClamp() {

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBTextureCompression {
public static final int GL_COMPRESSED_ALPHA_ARB = 0x84E9;
public static final int GL_COMPRESSED_LUMINANCE_ARB = 0x84EA;
public static final int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB;
@ -62,120 +63,148 @@ public final class ARBTextureCompression {
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position());
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, Buffer pData, int pData_offset);
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position());
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer pData, int pData_offset);
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position());
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_offset);
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, ByteBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position());
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, Buffer pData, int pData_offset);
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, ByteBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position());
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, Buffer pData, int pData_offset);
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position());
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position() << 1);
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position() << 2);
}
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
BufferChecks.checkDirect(pData);
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position() << 2);
}
private static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_offset);
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position());
}
public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) {
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1);
}
public static void glGetCompressedTexImageARB(int target, int lod, IntBuffer pImg) {
BufferChecks.checkDirect(pImg);
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2);
}
private static native void nglGetCompressedTexImageARB(int target, int lod, Buffer pImg, int pImg_offset);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBTextureCubeMap {
public static final int GL_NORMAL_MAP_ARB = 0x8511;
public static final int GL_REFLECTION_MAP_ARB = 0x8512;
public static final int GL_TEXTURE_CUBE_MAP_ARB = 0x8513;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBTextureEnvCombine {
public static final int GL_COMBINE_ARB = 0x8570;
public static final int GL_COMBINE_RGB_ARB = 0x8571;
public static final int GL_COMBINE_ALPHA_ARB = 0x8572;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBTextureEnvDot3 {
public static final int GL_DOT3_RGB_ARB = 0x86AE;
public static final int GL_DOT3_RGBA_ARB = 0x86AF;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBTextureMirroredRepeat {
public static final int GL_MIRRORED_REPEAT_ARB = 0x8370;
private ARBTextureMirroredRepeat() {

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBTransposeMatrix {
public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3;
public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
@ -51,11 +52,13 @@ public final class ARBTransposeMatrix {
BufferChecks.checkBuffer(pfMtx, 16);
nglLoadTransposeMatrixfARB(pfMtx, pfMtx.position());
}
private static native void nglLoadTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
public static void glMultTransposeMatrixfARB(FloatBuffer pfMtx) {
BufferChecks.checkBuffer(pfMtx, 16);
nglMultTransposeMatrixfARB(pfMtx, pfMtx.position());
}
private static native void nglMultTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
}

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBVertexBlend {
public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4;
public static final int GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5;
public static final int GL_WEIGHT_SUM_UNITY_ARB = 0x86A6;
@ -93,42 +94,49 @@ public final class ARBVertexBlend {
BufferChecks.checkDirect(pWeights);
nglWeightbvARB(pWeights.remaining(), pWeights, pWeights.position());
}
private static native void nglWeightbvARB(int size, ByteBuffer pWeights, int pWeights_offset);
public static void glWeightARB(FloatBuffer pfWeights) {
BufferChecks.checkDirect(pfWeights);
nglWeightfvARB(pfWeights.remaining(), pfWeights, pfWeights.position());
}
private static native void nglWeightfvARB(int size, FloatBuffer pfWeights, int pfWeights_offset);
public static void glWeightARB(IntBuffer piWeights) {
BufferChecks.checkDirect(piWeights);
nglWeightivARB(piWeights.remaining(), piWeights, piWeights.position());
}
private static native void nglWeightivARB(int size, IntBuffer piWeights, int piWeights_offset);
public static void glWeightARB(ShortBuffer psWeights) {
BufferChecks.checkDirect(psWeights);
nglWeightsvARB(psWeights.remaining(), psWeights, psWeights.position());
}
private static native void nglWeightsvARB(int size, ShortBuffer psWeights, int psWeights_offset);
public static void glWeightuARB(ByteBuffer pWeights) {
BufferChecks.checkDirect(pWeights);
nglWeightubvARB(pWeights.remaining(), pWeights, pWeights.position());
}
private static native void nglWeightubvARB(int size, ByteBuffer pWeights, int pWeights_offset);
public static void glWeightuARB(IntBuffer piWeights) {
BufferChecks.checkDirect(piWeights);
nglWeightuivARB(piWeights.remaining(), piWeights, piWeights.position());
}
private static native void nglWeightuivARB(int size, IntBuffer piWeights, int piWeights_offset);
public static void glWeightuARB(ShortBuffer psWeights) {
BufferChecks.checkDirect(psWeights);
nglWeightusvARB(psWeights.remaining(), psWeights, psWeights.position());
}
private static native void nglWeightusvARB(int size, ShortBuffer psWeights, int psWeights_offset);
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
@ -136,26 +144,33 @@ public final class ARBVertexBlend {
GLBufferChecks.ensureArrayVBOdisabled();
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position());
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pPointer, pPointer.position() << 1);
}
public static void glWeightPointerARB(int size, int stride, FloatBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2);
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pPointer, pPointer.position() << 2);
}
private static native void nglWeightPointerARB(int size, int type, int stride, Buffer pPointer, int pPointer_offset);
public static void glWeightPointerARB(int size, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglWeightPointerARBVBO(size, type, stride, buffer_offset);
}
private static native void nglWeightPointerARBVBO(int size, int type, int stride, int buffer_offset);
public static native void glVertexBlendARB(int count);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ARBVertexBufferObject extends ARBBufferObject {
/*
* Accepted by the <target> parameters of BindBufferARB, BufferDataARB,
* BufferSubDataARB, MapBufferARB, UnmapBufferARB,

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBVertexProgram extends ARBProgram {
/*
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
* <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,

View File

@ -38,6 +38,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ARBVertexShader {
/*
* Accepted by the <shaderType> argument of CreateShaderObjectARB and
* returned by the <params> parameter of GetObjectParameter{if}vARB:
@ -114,27 +115,20 @@ public final class ARBVertexShader {
// ---------------------------
// ---------------------------
public static void glGetActiveAttribARB(int programObj, int index,
IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
public static void glGetActiveAttribARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) {
BufferChecks.checkDirect(name);
BufferChecks.checkDirect(size);
BufferChecks.checkDirect(type);
if ( length == null ) {
nglGetActiveAttribARB(programObj, index, name.remaining(), null, -1,
size, size.position(), type, type.position(), name, name.position());
nglGetActiveAttribARB(programObj, index, name.remaining(), null, -1, size, size.position(), type, type.position(), name, name.position());
} else {
BufferChecks.checkDirect(length);
nglGetActiveAttribARB(programObj, index, name.remaining(), length, length.position(),
size, size.position(), type, type.position(), name, name.position());
nglGetActiveAttribARB(programObj, index, name.remaining(), length, length.position(), size, size.position(), type, type.position(), name, name.position());
}
}
private static native void nglGetActiveAttribARB(int programObj, int index, int maxLength,
IntBuffer length, int lengthOffset,
IntBuffer size, int sizeOffset,
IntBuffer type, int typeOffset,
ByteBuffer name, int nameOffset);
private static native void nglGetActiveAttribARB(int programObj, int index, int maxLength, IntBuffer length, int lengthOffset, IntBuffer size, int sizeOffset, IntBuffer type, int typeOffset, ByteBuffer name, int nameOffset);
// ---------------------------
// ---------------------------

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBWindowPos {
private ARBWindowPos() {
}

View File

@ -40,6 +40,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ATIElementArray {
public static final int GL_ELEMENT_ARRAY_ATI = 0x8768;
public static final int GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769;
public static final int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A;
@ -54,24 +55,29 @@ public final class ATIElementArray {
GLBufferChecks.ensureArrayVBOdisabled();
nglElementPointerATI(GL11.GL_UNSIGNED_BYTE, pPointer, pPointer.position());
}
public static void glElementPointerATI(ShortBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglElementPointerATI(GL11.GL_UNSIGNED_SHORT, pPointer, pPointer.position() << 1);
}
public static void glElementPointerATI(IntBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglElementPointerATI(GL11.GL_UNSIGNED_INT, pPointer, pPointer.position() << 2);
}
private static native void nglElementPointerATI(int type, Buffer pPointer, int pPointer_offset);
public static void glElementPointerATI(int type, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglElementPointerATIVBO(type, buffer_offset);
}
private static native void nglElementPointerATIVBO(int type, int buffer_offset);
public static native void glDrawElementArrayATI(int mode, int count);
public static native void glDrawRangeElementArrayATI(int mode, int start, int end, int count);
}

View File

@ -38,6 +38,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ATIEnvmapBumpmap {
public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775;
public static final int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776;
public static final int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777;
@ -56,23 +57,27 @@ public final class ATIEnvmapBumpmap {
BufferChecks.checkBuffer(pfParam);
nglTexBumpParameterfvATI(pname, pfParam, pfParam.position());
}
private static native void nglTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset);
public static void glTexBumpParameterATI(int pname, IntBuffer piParam) {
BufferChecks.checkBuffer(piParam);
nglTexBumpParameterivATI(pname, piParam, piParam.position());
}
private static native void nglTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset);
public static void glGetTexBumpParameterATI(int pname, FloatBuffer pfParam) {
BufferChecks.checkBuffer(pfParam);
nglGetTexBumpParameterfvATI(pname, pfParam, pfParam.position());
}
private static native void nglGetTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset);
public static void glGetTexBumpParameterATI(int pname, IntBuffer piParam) {
BufferChecks.checkBuffer(piParam);
nglGetTexBumpParameterivATI(pname, piParam, piParam.position());
}
private static native void nglGetTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset);
}

View File

@ -42,6 +42,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ATIFragmentShader {
public static final int GL_FRAGMENT_SHADER_ATI = 0x8920;
public static final int GL_REG_0_ATI = 0x8921;
public static final int GL_REG_1_ATI = 0x8922;
@ -166,78 +167,22 @@ public final class ATIFragmentShader {
public static native void glSampleMapATI(int dst, int interp, int swizzle);
public static native void glColorFragmentOp1ATI(
int op,
int dst,
int dstMask,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod);
public static native void glColorFragmentOp1ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod);
public static native void glColorFragmentOp2ATI(
int op,
int dst,
int dstMask,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod,
int arg2,
int arg2Rep,
int arg2Mod);
public static native void glColorFragmentOp2ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod);
public static native void glColorFragmentOp3ATI(
int op,
int dst,
int dstMask,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod,
int arg2,
int arg2Rep,
int arg2Mod,
int arg3,
int arg3Rep,
int arg3Mod);
public static native void glColorFragmentOp3ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod);
public static native void glAlphaFragmentOp1ATI(
int op,
int dst,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod);
public static native void glAlphaFragmentOp1ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod);
public static native void glAlphaFragmentOp2ATI(
int op,
int dst,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod,
int arg2,
int arg2Rep,
int arg2Mod);
public static native void glAlphaFragmentOp2ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod);
public static native void glAlphaFragmentOp3ATI(
int op,
int dst,
int dstMod,
int arg1,
int arg1Rep,
int arg1Mod,
int arg2,
int arg2Rep,
int arg2Mod,
int arg3,
int arg3Rep,
int arg3Mod);
public static native void glAlphaFragmentOp3ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod);
public static void glSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue) {
BufferChecks.checkBuffer(pfValue); // TODO:is this correct?
nglSetFragmentShaderConstantATI(dst, pfValue, pfValue.position());
}
private static native void nglSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue, int pfValue_offset);
}

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATIPnTriangles {
public static final int GL_PN_TRIANGLES_ATI = 0x87F0;
public static final int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1;
public static final int GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2;

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATISeparateStencil {
public static final int GL_STENCIL_BACK_FUNC_ATI = 0x8800;
public static final int GL_STENCIL_BACK_FAIL_ATI = 0x8801;
public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802;
@ -45,5 +46,6 @@ public final class ATISeparateStencil {
static native void initNativeStubs() throws LWJGLException;
public static native void glStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass);
public static native void glStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ATITextureFloat {
/*
* Accepted by the <internalFormat> parameter of TexImage1D,
* TexImage2D, and TexImage3D:

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class ATITextureMirrorOnce {
public static final int GL_MIRROR_CLAMP_ATI = 0x8742;
public static final int GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743;

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ATIVertexArrayObject {
public static final int GL_STATIC_ATI = 0x8760;
public static final int GL_DYNAMIC_ATI = 0x8761;
public static final int GL_PRESERVE_ATI = 0x8762;
@ -59,87 +60,93 @@ public final class ATIVertexArrayObject {
BufferChecks.checkDirectOrNull(pPointer);
return nglNewObjectBufferATI(pPointer != null ? pPointer.remaining() : size, pPointer, pPointer != null ? pPointer.position() : 0, usage);
}
public static int glNewObjectBufferATI(int size, ShortBuffer pPointer, int usage) {
BufferChecks.checkDirectOrNull(pPointer);
return nglNewObjectBufferATI(pPointer != null ? pPointer.remaining() << 1 : size, pPointer, pPointer != null ? pPointer.position() << 1 : 0, usage);
}
public static int glNewObjectBufferATI(int size, FloatBuffer pPointer, int usage) {
BufferChecks.checkDirectOrNull(pPointer);
return nglNewObjectBufferATI(pPointer != null ? pPointer.remaining() << 2 : size, pPointer, pPointer != null ? pPointer.position() << 2 : 0, usage);
}
public static int glNewObjectBufferATI(int size, IntBuffer pPointer, int usage) {
BufferChecks.checkDirectOrNull(pPointer);
return nglNewObjectBufferATI(pPointer != null ? pPointer.remaining() << 2 : size, pPointer, pPointer != null ? pPointer.position() << 2 : 0, usage);
}
private static native int nglNewObjectBufferATI(int size, Buffer pPointer, int pPointer_offset, int usage);
public static native boolean glIsObjectBufferATI(int buffer);
public static void glUpdateObjectBufferATI(int buffer, int offset, ByteBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining(), pPointer, pPointer.position(), preserve);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, ShortBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining() << 1, pPointer, pPointer.position() << 1, preserve);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, FloatBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining() << 2, pPointer, pPointer.position() << 2, preserve);
}
public static void glUpdateObjectBufferATI(int buffer, int offset, IntBuffer pPointer, int preserve) {
BufferChecks.checkDirect(pPointer);
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining() << 2, pPointer, pPointer.position() << 2, preserve);
}
private static native void nglUpdateObjectBufferATI(int buffer, int offset, int size, Buffer pPointer, int pPointer_offset, int preserve);
public static void glGetObjectBufferATI(int buffer, int pname, FloatBuffer pfParams) {
BufferChecks.checkDirect(pfParams);
nglGetObjectBufferfvATI(buffer, pname, pfParams, pfParams.position());
}
private static native void nglGetObjectBufferfvATI(int buffer, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetObjectBufferATI(int buffer, int pname, IntBuffer piParams) {
BufferChecks.checkDirect(piParams);
nglGetObjectBufferivATI(buffer, pname, piParams, piParams.position());
}
private static native void nglGetObjectBufferivATI(int buffer, int pname, IntBuffer piParams, int piParams_offset);
public static native void glFreeObjectBufferATI(int buffer);
public static native void glArrayObjectATI(
int array,
int size,
int type,
int stride,
int buffer,
int offset);
public static native void glArrayObjectATI(int array, int size, int type, int stride, int buffer, int offset);
public static void glGetArrayObjectATI(int array, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetArrayObjectfvATI(array, pname, pfParams, pfParams.position());
}
private static native void nglGetArrayObjectfvATI(int array, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetArrayObjectATI(int array, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetArrayObjectivATI(array, pname, piParams, piParams.position());
}
private static native void nglGetArrayObjectivATI(int array, int pname, IntBuffer piParams, int piParams_offset);
public static native void glVariantArrayObjectATI(
int id,
int type,
int stride,
int buffer,
int offset);
public static native void glVariantArrayObjectATI(int id, int type, int stride, int buffer, int offset);
public static void glGetVariantArrayObjectATI(int id, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetVariantArrayObjectfvATI(id, pname, pfParams, pfParams.position());
}
private static native void nglGetVariantArrayObjectfvATI(int id, int pname, FloatBuffer pfParams, int pfParams_offset_offset);
public static void glGetVariantArrayObjectATI(int id, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetVariantArrayObjectivATI(id, pname, piParams, piParams.position());
}
private static native void nglGetVariantArrayObjectivATI(int id, int pname, IntBuffer piParams, int piParams_offset);
}

View File

@ -38,14 +38,13 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class ATIVertexAttribArrayObject {
private ATIVertexAttribArrayObject() {
}
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexAttribArrayObjectATI(int index, int size, int type,
boolean normalized, int stride, int buffer,
int offset);
public static native void glVertexAttribArrayObjectATI(int index, int size, int type, boolean normalized, int stride, int buffer, int offset);
// ---------------------------
public static void glGetVertexAttribArrayObjectATI(int index, int pname, FloatBuffer params) {
@ -53,9 +52,7 @@ public final class ATIVertexAttribArrayObject {
nglGetVertexAttribArrayObjectfvATI(index, pname, params, params.position());
}
private static native void nglGetVertexAttribArrayObjectfvATI(int index, int pname,
FloatBuffer params,
int paramsOffset);
private static native void nglGetVertexAttribArrayObjectfvATI(int index, int pname, FloatBuffer params, int paramsOffset);
// ---------------------------
// ---------------------------
@ -64,8 +61,7 @@ public final class ATIVertexAttribArrayObject {
nglGetVertexAttribArrayObjectivATI(index, pname, params, params.position());
}
private static native void nglGetVertexAttribArrayObjectivATI(int index, int pname,
IntBuffer params, int paramsOffset);
private static native void nglGetVertexAttribArrayObjectivATI(int index, int pname, IntBuffer params, int paramsOffset);
// ---------------------------
}

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATIVertexStreams {
public static final int GL_MAX_VERTEX_STREAMS_ATI = 0x876B;
public static final int GL_VERTEX_SOURCE_ATI = 0x876C;
public static final int GL_VERTEX_STREAM0_ATI = 0x876D;
@ -51,37 +52,40 @@ public final class ATIVertexStreams {
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexStream1fATI(int stream, float x);
public static native void glVertexStream1iATI(int stream, int x);
public static native void glVertexStream1sATI(int stream, short x);
public static native void glVertexStream2fATI(int stream, float x, float y);
public static native void glVertexStream2iATI(int stream, int x, int y);
public static native void glVertexStream2sATI(int stream, short x, short y);
public static native void glVertexStream3fATI(int stream, float x, float y, float z);
public static native void glVertexStream3iATI(int stream, int x, int y, int z);
public static native void glVertexStream3sATI(int stream, short x, short y, short z);
public static native void glVertexStream4fATI(
int stream,
float x,
float y,
float z,
float w);
public static native void glVertexStream4iATI(
int stream,
int x,
int y,
int z,
int w);
public static native void glVertexStream4sATI(
int stream,
short x,
short y,
short z,
short w);
public static native void glVertexStream4fATI(int stream, float x, float y, float z, float w);
public static native void glVertexStream4iATI(int stream, int x, int y, int z, int w);
public static native void glVertexStream4sATI(int stream, short x, short y, short z, short w);
public static native void glNormalStream3bATI(int stream, byte x, byte y, byte z);
public static native void glNormalStream3fATI(int stream, float x, float y, float z);
public static native void glNormalStream3iATI(int stream, int x, int y, int z);
public static native void glNormalStream3sATI(int stream, short x, short y, short z);
public static native void glClientActiveVertexStreamATI(int stream);
public static native void glVertexBlendEnvfATI(int pname, float param);
public static native void glVertexBlendEnviATI(int pname, int param);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTAbgr {
public static final int GL_ABGR_EXT = 0x8000;
private EXTAbgr() {

View File

@ -37,6 +37,7 @@
* @author cas
*/
public final class EXTBgra {
public static final int GL_BGR_EXT = 0x80E0;
public static final int GL_BGRA_EXT = 0x80E1;

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTBlendEquationSeparate {
/*
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
* GetFloatv, and GetDoublev:

View File

@ -33,11 +33,8 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
/**
* Insert the type's description here.
* Creation date: (29/06/2000 00:45:10)
*/
public final class EXTBlendFuncSeparate {
public static final int GL_BLEND_DST_RGB_EXT = 0x80C8;
public static final int GL_BLEND_SRC_RGB_EXT = 0x80C9;
public static final int GL_BLEND_DST_ALPHA_EXT = 0x80CA;

View File

@ -33,9 +33,11 @@ package org.lwjgl.opengl;
/**
* EXT_blend_subtract constants
*
* @author cas
*/
public final class EXTBlendSubtract {
public static final int GL_FUNC_SUBTRACT_EXT = 0x800A;
public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B;

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTCompiledVertexArray {
public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8;
public static final int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9;
@ -43,5 +44,6 @@ public final class EXTCompiledVertexArray {
static native void initNativeStubs() throws LWJGLException;
public static native void glLockArraysEXT(int first, int count);
public static native void glUnlockArraysEXT();
}

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTDepthBoundsTest {
/*
Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
and by the <pname> parameter of GetBooleanv, GetIntegerv,

View File

@ -40,6 +40,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTDrawRangeElements {
public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9;
@ -53,21 +54,25 @@ public final class EXTDrawRangeElements {
GLBufferChecks.ensureElementVBOdisabled();
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_BYTE, pIndices, pIndices.position());
}
public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
GLBufferChecks.ensureElementVBOdisabled();
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position() << 1);
}
public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) {
BufferChecks.checkDirect(pIndices);
GLBufferChecks.ensureElementVBOdisabled();
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2);
}
private static native void nglDrawRangeElementsEXT(int mode, int start, int end, int count, int type, Buffer pIndices, int pIndices_offset);
public static void glDrawRangeElementsEXT(int mode, int start, int end, int count, int type, int buffer_offset) {
GLBufferChecks.ensureElementVBOenabled();
nglDrawRangeElementsEXTVBO(mode, start, end, count, type, buffer_offset);
}
private static native void nglDrawRangeElementsEXTVBO(int mode, int start, int end, int count, int type, int buffer_offset);
}

View File

@ -38,6 +38,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTFogCoord {
public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450;
public static final int GL_FOG_COORDINATE_EXT = 0x8451;
public static final int GL_FRAGMENT_DEPTH_EXT = 0x8452;
@ -53,15 +54,19 @@ public final class EXTFogCoord {
static native void initNativeStubs() throws LWJGLException;
public static native void glFogCoordfEXT(float coord);
public static void glFogCoordPointerEXT(int stride, FloatBuffer data) {
BufferChecks.checkDirect(data);
GLBufferChecks.ensureArrayVBOdisabled();
nglFogCoordPointerEXT(GL11.GL_FLOAT, stride, data, data.position() << 2);
}
private static native void nglFogCoordPointerEXT(int type, int stride, Buffer data, int data_offset);
public static void glFogCoordPointerEXT(int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglFogCoordPointerEXTVBO(type, stride, buffer_offset);
}
private static native void nglFogCoordPointerEXTVBO(int type, int stride, int buffer_offset);
}

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTMultiDrawArrays {
private EXTMultiDrawArrays() {
}
@ -50,5 +51,6 @@ public final class EXTMultiDrawArrays {
}
nglMultiDrawArraysEXT(mode, piFirst, piFirst.position(), piCount, piCount.position(), piFirst.remaining());
}
private static native void nglMultiDrawArraysEXT(int mode, IntBuffer piFirst, int piFirst_offset, IntBuffer piCount, int piCount_offset, int primcount);
}

View File

@ -31,11 +31,8 @@
*/
package org.lwjgl.opengl;
/**
* Insert the type's description here.
* Creation date: (07/11/99 19:16:17)
*/
public final class EXTPackedPixels {
public static final int GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032;
public static final int GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033;
public static final int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTPixelBufferObject extends ARBBufferObject {
/*
* Accepted by the <target> parameters of BindBuffer, BufferData,
* BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData,

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTPointParameters {
public static final int GL_POINT_SIZE_MIN_EXT = 0x8126;
public static final int GL_POINT_SIZE_MAX_EXT = 0x8127;
public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128;
@ -54,5 +55,6 @@ public final class EXTPointParameters {
BufferChecks.checkBuffer(pfParams);
nglPointParameterfvEXT(pname, pfParams, pfParams.position());
}
private static native void nglPointParameterfvEXT(int pname, FloatBuffer pfParams, int pfParams_offset);
}

View File

@ -31,12 +31,8 @@
*/
package org.lwjgl.opengl;
/**
* EXT_rescale_normal
* @author cas
*/
public final class EXTRescaleNormal {
public static final int GL_RESCALE_NORMAL_EXT = 0x803A;
private EXTRescaleNormal() {

View File

@ -39,6 +39,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTSecondaryColor {
public static final int GL_COLOR_SUM_EXT = 0x8458;
public static final int GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459;
public static final int GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A;
@ -63,16 +64,19 @@ public final class EXTSecondaryColor {
GLBufferChecks.ensureArrayVBOdisabled();
nglSecondaryColorPointerEXT(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position());
}
public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) {
BufferChecks.checkDirect(pPointer);
GLBufferChecks.ensureArrayVBOdisabled();
nglSecondaryColorPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2);
}
private static native void nglSecondaryColorPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_offset);
public static void glSecondaryColorPointerEXT(int size, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglSecondaryColorPointerEXTVBO(size, type, stride, buffer_offset);
}
private static native void nglSecondaryColorPointerEXTVBO(int size, int type, int stride, int buffer_offset);
}

View File

@ -31,12 +31,8 @@
*/
package org.lwjgl.opengl;
/**
* EXT_separate_specular_color constants.
* @author cas
*/
public final class EXTSeparateSpecularColor {
public static final int GL_SINGLE_COLOR_EXT = 0x81F9;
public static final int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA;
public static final int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8;

View File

@ -31,11 +31,8 @@
*/
package org.lwjgl.opengl;
/**
* Insert the type's description here.
* Creation date: (07/11/99 19:15:54)
*/
public final class EXTSharedTexturePalette {
public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB;
private EXTSharedTexturePalette() {

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTStencilTwoSide {
public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910;
public static final int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTStencilWrap {
public static final int GL_INCR_WRAP_EXT = 0x8507;
public static final int GL_DECR_WRAP_EXT = 0x8508;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTTextureCompressionS3TC {
public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;

View File

@ -31,11 +31,9 @@
*/
package org.lwjgl.opengl;
/**
* Insert the type's description here.
* Creation date: (22/02/00 01:26:05)
*/
/** Insert the type's description here. Creation date: (22/02/00 01:26:05) */
public final class EXTTextureEnvCombine {
public static final int GL_COMBINE_EXT = 0x8570;
public static final int GL_COMBINE_RGB_EXT = 0x8571;
public static final int GL_COMBINE_ALPHA_EXT = 0x8572;

View File

@ -31,12 +31,8 @@
*/
package org.lwjgl.opengl;
/**
* EXT_texture_env_dot3 constants.
* @author cas
*/
public final class EXTTextureEnvDot3 {
public static final int GL_DOT3_RGB_EXT = 0x8740;
public static final int GL_DOT3_RGBA_EXT = 0x8741;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTTextureFilterAnisotropic {
public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTTextureLODBias {
public static final int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500;
public static final int GL_TEXTURE_LOD_BIAS_EXT = 0x8501;
public static final int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTTextureMirrorClamp {
/*
* Accepted by the <param> parameter of TexParameteri and TexParameterf,
* and by the <params> parameter of TexParameteriv and TexParameterfv,

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class EXTTextureRectangle {
public static final int GL_TEXTURE_RECTANGLE_EXT = 0x84F5;
public static final int GL_TEXTURE_BINDING_RECTANGLE_EXT = 0x84F6;
public static final int GL_PROXY_TEXTURE_RECTANGLE_EXT = 0x84F7;

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTVertexShader {
public static final int GL_VERTEX_SHADER_EXT = 0x8780;
public static final int GL_VERTEX_SHADER_BINDING_EXT = 0x8781;
public static final int GL_OP_INDEX_EXT = 0x8782;
@ -158,6 +159,7 @@ public final class EXTVertexShader {
static native void initNativeStubs() throws LWJGLException;
public static native void glBeginVertexShaderEXT();
public static native void glEndVertexShaderEXT();
public static native void glBindVertexShaderEXT(int id);
@ -170,140 +172,144 @@ public final class EXTVertexShader {
public static native void glShaderOp2EXT(int op, int res, int arg1, int arg2);
public static native void glShaderOp3EXT(
int op,
int res,
int arg1,
int arg2,
int arg3);
public static native void glShaderOp3EXT(int op, int res, int arg1, int arg2, int arg3);
public static native void glSwizzleEXT(
int res,
int in,
int outX,
int outY,
int outZ,
int outW);
public static native void glSwizzleEXT(int res, int in, int outX, int outY, int outZ, int outW);
public static native void glWriteMaskEXT(int res, int in, int outX, int outY, int outZ, int outW);
public static native void glWriteMaskEXT(
int res,
int in,
int outX,
int outY,
int outZ,
int outW);
public static native void glInsertComponentEXT(int res, int src, int num);
public static native void glExtractComponentEXT(int res, int src, int num);
public static native int glGenSymbolsEXT(
int dataType,
int storageType,
int range,
int components);
public static native int glGenSymbolsEXT(int dataType, int storageType, int range, int components);
public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position());
}
public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
}
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
}
public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2);
}
private static native void nglSetInvariantEXT(int id, int type, Buffer pAddr, int pAddr_offset);
public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position());
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
}
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2);
}
private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_offset);
public static void glVariantEXT(int id, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglVariantbvEXT(id, pAddr, pAddr.position());
}
private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_offset);
public static void glVariantEXT(int id, ShortBuffer psAddr) {
BufferChecks.checkBuffer(psAddr);
nglVariantsvEXT(id, psAddr, psAddr.position());
}
private static native void nglVariantsvEXT(int id, ShortBuffer psAddr, int psAddr_offset);
public static void glVariantEXT(int id, FloatBuffer pfAddr) {
BufferChecks.checkBuffer(pfAddr);
nglVariantfvEXT(id, pfAddr, pfAddr.position());
}
private static native void nglVariantfvEXT(int id, FloatBuffer pfAddr, int pfAddr_offset);
public static void glVariantEXT(int id, IntBuffer piAddr) {
BufferChecks.checkBuffer(piAddr);
nglVariantivEXT(id, piAddr, piAddr.position());
}
private static native void nglVariantivEXT(int id, IntBuffer piAddr, int piAddr_offset);
public static void glVariantuEXT(int id, ByteBuffer pAddr) {
BufferChecks.checkBuffer(pAddr);
nglVariantubvEXT(id, pAddr, pAddr.position());
}
private static native void nglVariantubvEXT(int id, ByteBuffer pAddr, int pAddr_offset);
public static void glVariantuEXT(int id, ShortBuffer psAddr) {
BufferChecks.checkBuffer(psAddr);
nglVariantusvEXT(id, psAddr, psAddr.position());
}
private static native void nglVariantusvEXT(int id, ShortBuffer psAddr, int psAddr_offset);
public static void glVariantuEXT(int id, IntBuffer piAddr) {
BufferChecks.checkBuffer(piAddr);
nglVariantuivEXT(id, piAddr, piAddr.position());
}
private static native void nglVariantuivEXT(int id, IntBuffer piAddr, int piAddr_offset);
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) {
BufferChecks.checkDirect(pAddr);
GLBufferChecks.ensureArrayVBOdisabled();
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pAddr, pAddr.position());
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) {
BufferChecks.checkDirect(pAddr);
GLBufferChecks.ensureArrayVBOdisabled();
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1);
}
public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) {
BufferChecks.checkDirect(pAddr);
GLBufferChecks.ensureArrayVBOdisabled();
nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2);
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) {
BufferChecks.checkDirect(pAddr);
GLBufferChecks.ensureArrayVBOdisabled();
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position() << 2);
}
private static native void nglVariantPointerEXT(int id, int type, int stride, Buffer pAddr, int pAddr_offset);
public static void glVariantPointerEXT(int id, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglVariantPointerEXTVBO(id, type, stride, buffer_offset);
}
private static native void nglVariantPointerEXTVBO(int id, int type, int stride, int buffer_offset);
public static native void glEnableVariantClientStateEXT(int id);
public static native void glDisableVariantClientStateEXT(int id);
@ -317,59 +323,71 @@ public final class EXTVertexShader {
public static native int glBindTextureUnitParameterEXT(int unit, int value);
public static native int glBindParameterEXT(int value);
public static native boolean glIsVariantEnabledEXT(int id, int cap);
public static void glGetVariantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkDirect(pbData);
nglGetVariantBooleanvEXT(id, value, pbData, pbData.position());
}
private static native void nglGetVariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
public static void glGetVariantIntegerEXT(int id, int value, IntBuffer piData) {
BufferChecks.checkDirect(piData);
nglGetVariantIntegervEXT(id, value, piData, piData.position());
}
private static native void nglGetVariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
public static void glGetVariantFloatEXT(int id, int value, FloatBuffer pfData) {
BufferChecks.checkDirect(pfData);
nglGetVariantFloatvEXT(id, value, pfData, pfData.position());
}
private static native void nglGetVariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
public static native ByteBuffer glGetVariantPointerEXT(int id, int value, int size);
public static void glGetInvariantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkDirect(pbData);
nglGetInvariantBooleanvEXT(id, value, pbData, pbData.position());
}
private static native void nglGetInvariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
public static void glGetInvariantIntegerEXT(int id, int value, IntBuffer piData) {
BufferChecks.checkDirect(piData);
nglGetInvariantIntegervEXT(id, value, piData, piData.position());
}
private static native void nglGetInvariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
public static void glGetInvariantFloatEXT(int id, int value, FloatBuffer pfData) {
BufferChecks.checkDirect(pfData);
nglGetInvariantFloatvEXT(id, value, pfData, pfData.position());
}
private static native void nglGetInvariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
public static void glGetLocalConstantBooleanEXT(int id, int value, ByteBuffer pbData) {
BufferChecks.checkDirect(pbData);
nglGetLocalConstantBooleanvEXT(id, value, pbData, pbData.position());
}
private static native void nglGetLocalConstantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
public static void glGetLocalConstantIntegerEXT(int id, int value, IntBuffer piData) {
BufferChecks.checkDirect(piData);
nglGetLocalConstantIntegervEXT(id, value, piData, piData.position());
}
private static native void nglGetLocalConstantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pfData) {
BufferChecks.checkDirect(pfData);
nglGetLocalConstantFloatvEXT(id, value, pfData, pfData.position());
}
private static native void nglGetLocalConstantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
}

View File

@ -38,12 +38,13 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class EXTVertexWeighting {
public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; /* alias to MODELVIEW_STACK_DEPTH */
public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3;
public static final int GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502;
public static final int GL_MODELVIEW0_MATRIX_EXT = 0x0BA6; /* alias to MODELVIEW_MATRIX */
public static final int GL_MODELVIEW0_MATRIX_EXT = 0x0BA6;
public static final int GL_MODELVIEW1_MATRIX_EXT = 0x8506;
public static final int GL_VERTEX_WEIGHTING_EXT = 0x8509;
public static final int GL_MODELVIEW0_EXT = 0x1700; /* alias to MODELVIEW */
public static final int GL_MODELVIEW0_EXT = 0x1700;
public static final int GL_MODELVIEW1_EXT = 0x850A;
public static final int GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B;
public static final int GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C;
@ -64,10 +65,13 @@ public final class EXTVertexWeighting {
GLBufferChecks.ensureArrayVBOdisabled();
nglVertexWeightPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2);
}
private static native void nglVertexWeightPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_offset);
public static void glVertexWeightPointerEXT(int size, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglVertexWeightPointerEXTVBO(size, type, stride, buffer_offset);
}
private static native void nglVertexWeightPointerEXTVBO(int size, int type, int stride, int buffer_offset);
}

View File

@ -42,13 +42,14 @@ import org.lwjgl.BufferChecks;
/**
* $Id$
*
* <p/>
* The core OpenGL1.3 API.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public final class GL13 {
public static final int GL_TEXTURE0 = 0x84C0;
public static final int GL_TEXTURE1 = 0x84C1;
public static final int GL_TEXTURE2 = 0x84C2;
@ -157,139 +158,183 @@ public final class GL13 {
static native void initNativeStubs() throws LWJGLException;
public static native void glActiveTexture(int texture);
public static native void glClientActiveTexture(int texture);
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position());
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 1);
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 2);
}
public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, Buffer data, int data_offset);
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position());
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 1);
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 2);
}
public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data, int data_offset);
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position());
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 1);
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 2);
}
public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer data, int data_offset);
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position());
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 1);
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 2);
}
public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, Buffer data, int data_offset);
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position());
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 1);
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 2);
}
public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data, int data_offset);
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position());
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 1);
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 2);
}
public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, FloatBuffer data) {
BufferChecks.checkDirect(data);
nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 2);
}
private static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer data, int data_offset);
public static void glGetCompressedTexImage(int target, int lod, ByteBuffer img) {
BufferChecks.checkDirect(img);
// TODO: check buffer size valid
nglGetCompressedTexImage(target, lod, img, img.position());
}
public static void glGetCompressedTexImage(int target, int lod, ShortBuffer img) {
BufferChecks.checkDirect(img);
// TODO: check buffer size valid
nglGetCompressedTexImage(target, lod, img, img.position() << 1);
}
public static void glGetCompressedTexImage(int target, int lod, IntBuffer img) {
BufferChecks.checkDirect(img);
// TODO: check buffer size valid
nglGetCompressedTexImage(target, lod, img, img.position() << 2);
}
private static native void nglGetCompressedTexImage(int target, int lod, Buffer img, int img_offset);
public static native void glMultiTexCoord1f(int target, float s);
public static native void glMultiTexCoord2f(int target, float s, float t);
public static native void glMultiTexCoord3f(int target, float s, float t, float r);
public static native void glMultiTexCoord4f(int target, float s, float t, float r, float q);
public static void glLoadTransposeMatrix(FloatBuffer m) {
BufferChecks.checkBuffer(m, 16);
nglLoadTransposeMatrixf(m, m.position());
}
private static native void nglLoadTransposeMatrixf(FloatBuffer m, int m_offset);
public static void glMultTransposeMatrix(FloatBuffer m) {
BufferChecks.checkBuffer(m, 16);
nglMultTransposeMatrixf(m, m.position());
}
private static native void nglMultTransposeMatrixf(FloatBuffer m, int m_offset);
public static native void glSampleCoverage(float value, boolean invert);
}

View File

@ -41,13 +41,14 @@ import org.lwjgl.BufferChecks;
/**
* $Id$
*
* <p/>
* The core OpenGL1.4 API.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public final class GL14 {
public static final int GL_GENERATE_MIPMAP = 0x8191;
public static final int GL_GENERATE_MIPMAP_HINT = 0x8192;
public static final int GL_DEPTH_COMPONENT16 = 0x81A5;
@ -94,19 +95,26 @@ public final class GL14 {
static native void initNativeStubs() throws LWJGLException;
public static native void glBlendEquation(int mode);
public static native void glBlendColor(float red, float green, float blue, float alpha);
public static native void glFogCoordf(float coord);
public static void glFogCoordPointer(int stride, FloatBuffer data) {
BufferChecks.checkDirect(data);
GLBufferChecks.ensureArrayVBOdisabled();
nglFogCoordPointer(GL11.GL_FLOAT, stride, data, data.position() << 2);
}
private static native void nglFogCoordPointer(int type, int stride, Buffer data, int data_offset);
public static void glFogCoordPointer(int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglFogCoordPointerVBO(type, stride, buffer_offset);
}
private static native void nglFogCoordPointerVBO(int type, int stride, int buffer_offset);
public static void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount) {
BufferChecks.checkDirect(piFirst);
BufferChecks.checkDirect(piCount);
@ -115,37 +123,53 @@ public final class GL14 {
}
nglMultiDrawArrays(mode, piFirst, piFirst.position(), piCount, piCount.position(), piFirst.remaining());
}
private static native void nglMultiDrawArrays(int mode, IntBuffer piFirst, int piFirst_offset, IntBuffer piCount, int piCount_offset, int primcount);
/* public static native void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);*/
public static native void glPointParameterf(int pname, float param);
public static void glPointParameter(int pname, FloatBuffer params) {
BufferChecks.checkBuffer(params);
nglPointParameterfv(pname, params, params.position());
}
private static native void nglPointParameterfv(int pname, FloatBuffer params, int params_offset);
public static native void glSecondaryColor3b(byte red, byte green, byte blue);
public static native void glSecondaryColor3f(float red, float green, float blue);
public static native void glSecondaryColor3ub(byte red, byte green, byte blue);
public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, ByteBuffer data) {
BufferChecks.checkDirect(data);
GLBufferChecks.ensureArrayVBOdisabled();
nglSecondaryColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, data, data.position());
}
public static void glSecondaryColorPointer(int size, int stride, FloatBuffer data) {
BufferChecks.checkDirect(data);
GLBufferChecks.ensureArrayVBOdisabled();
nglSecondaryColorPointer(size, GL11.GL_FLOAT, stride, data, data.position() << 2);
}
private static native void nglSecondaryColorPointer(int size, int type, int stride, Buffer data, int data_offset);
public static void glSecondaryColorPointer(int size, int type, int stride, int buffer_offset) {
GLBufferChecks.ensureArrayVBOenabled();
nglSecondaryColorPointerVBO(size, type, stride, buffer_offset);
}
private static native void nglSecondaryColorPointerVBO(int size, int type, int stride, int buffer_offset);
public static native void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha);
public static native void glWindowPos2f(float x, float y);
public static native void glWindowPos2i(int x, int y);
public static native void glWindowPos3f(float x, float y, float z);
public static native void glWindowPos3i(int x, int y, int z);
}

View File

@ -33,78 +33,79 @@ package org.lwjgl.opengl;
/**
* $Id$ A class to
* check buffer boundaries in GL methods. Many GL methods read data from the GL
* into a native Buffer at its current position. If there is unsufficient space
* in the buffer when the call is made then a buffer overflow would otherwise
* occur and cause unexpected behaviour, a crash, or worse, a security risk.
* Therefore in those methods where GL reads data back into a buffer, we will
* call a bounds check method from this class to ensure that there is
* sufficient space in the buffer.
*
* Thrown by the debug build library of the LWJGL if any OpenGL operation
* causes an error.
* $Id$ A class to check buffer boundaries in GL methods. Many GL
* methods read data from the GL into a native Buffer at its current position. If there is unsufficient space in the buffer when
* the call is made then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security
* risk. Therefore in those methods where GL reads data back into a buffer, we will call a bounds check method from this class
* to ensure that there is sufficient space in the buffer.
* <p/>
* Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
class GLBufferChecks {
/** Static methods only! */
private GLBufferChecks() {
}
/**
* Helper method to ensure that vertex buffer objects are disabled. If they
* are enabled, we'll throw an OpenGLException
*/
/** Helper method to ensure that vertex buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureArrayVBOdisabled() {
if ( VBOTracker.getVBOArrayStack().getState() != 0 ) {
throw new OpenGLException("Cannot use Buffers when VBO is enabled");
}
}
/**
* Helper method to ensure that vertex buffer objects are enabled. If they
* are disabled, we'll throw an OpenGLException
*/
/** Helper method to ensure that vertex buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureArrayVBOenabled() {
if ( VBOTracker.getVBOArrayStack().getState() == 0 ) {
throw new OpenGLException("Cannot use offsets when VBO is disabled");
}
}
/**
* Helper method to ensure that vertex buffer objects are disabled. If they
* are enabled, we'll throw an OpenGLException
*/
/** Helper method to ensure that vertex buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureElementVBOdisabled() {
if ( VBOTracker.getVBOElementStack().getState() != 0 ) {
throw new OpenGLException("Cannot use Buffers when VBO is enabled");
}
}
/**
* Helper method to ensure that vertex buffer objects are enabled. If they
* are disabled, we'll throw an OpenGLException
*/
/** Helper method to ensure that vertex buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureElementVBOenabled() {
if ( VBOTracker.getVBOElementStack().getState() == 0 ) {
throw new OpenGLException("Cannot use offsets when VBO is disabled");
}
}
/**
* Calculate the storage required for an image.
*
* @param format
* The format of the image (example: GL_RGBA)
* @param type
* The type of the image elements (example: GL_UNSIGNED_BYTE)
* @param width
* The width of the image
* @param height
* The height of the image (1 for 1D images)
* @param depth
* The depth of the image (1 for 2D images)
* @param format The format of the image (example: GL_RGBA)
* @param type The type of the image elements (example: GL_UNSIGNED_BYTE)
* @param width The width of the image
* @param height The height of the image (1 for 1D images)
* @param depth The depth of the image (1 for 2D images)
*
* @return the size, in bytes, of the image
*/
static int calculateImageStorage(int format, int type, int width, int height, int depth) {
return calculateBytesPerPixel(type, format) * width * height * depth;
}
static int calculateTexImage1DStorage(int format, int type, int width, int border) {
return calculateBytesPerPixel(type, format) * (width + (border << 1));
}
static int calculateTexImage2DStorage(int format, int type, int width, int height, int border) {
return calculateTexImage1DStorage(type, format, width, border) * (height + (border << 1));
}
static int calculateTexImage3DStorage(int format, int type, int width, int height, int depth, int border) {
return calculateTexImage2DStorage(type, format, width, height, border) * (depth + (border << 1));
}
private static int calculateBytesPerPixel(int type, int format) {
int bpe;
switch ( type ) {
case GL11.GL_UNSIGNED_BYTE:
@ -150,6 +151,7 @@ class GLBufferChecks {
/* // Assume 4 elements per pixel
epp = 4;*/
}
return epp * bpe * width * height * depth;
return bpe * epp;
}
}

View File

@ -33,26 +33,26 @@ package org.lwjgl.opengl;
/**
* $Id$
*
* <p/>
* GLU constants.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public interface GLUConstants {
/* Errors: (return value 0 = no error) */
public static final int GLU_INVALID_ENUM = 100900;
public static final int GLU_INVALID_VALUE = 100901;
public static final int GLU_OUT_OF_MEMORY = 100902;
public static final int GLU_INCOMPATIBLE_GL_VERSION = 100903;
int GLU_INVALID_ENUM = 100900;
int GLU_INVALID_VALUE = 100901;
int GLU_OUT_OF_MEMORY = 100902;
int GLU_INCOMPATIBLE_GL_VERSION = 100903;
/* StringName */
public static final int GLU_VERSION = 100800;
public static final int GLU_EXTENSIONS = 100801;
int GLU_VERSION = 100800;
int GLU_EXTENSIONS = 100801;
/* Boolean */
public static final int GLU_TRUE = GL11.GL_TRUE;
public static final int GLU_FALSE = GL11.GL_FALSE;
int GLU_TRUE = GL11.GL_TRUE;
int GLU_FALSE = GL11.GL_FALSE;
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVCopyDepthToColor {
public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E;
public static final int GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVDepthClamp {
public static final int GL_DEPTH_CLAMP_NV = 0x864F;
private NVDepthClamp() {

View File

@ -39,6 +39,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVEvaluators {
public static final int GL_EVAL_2D_NV = 0x86C0;
public static final int GL_EVAL_TRIANGULAR_2D_NV = 0x86C1;
public static final int GL_MAP_TESSELLATION_NV = 0x86C2;
@ -74,45 +75,58 @@ public final class NVEvaluators {
BufferChecks.checkDirect(pPoints);
nglGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints, pPoints.position() << 2);
}
private static native void nglGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, Buffer pPoints, int pPoints_offset);
public static void glMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, FloatBuffer pPoints) {
BufferChecks.checkDirect(pPoints);
// TODO:Check buffer size
nglMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints, pPoints.position() << 2);
}
private static native void nglMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, Buffer pPoints, int pPoints_offset);
public static void glMapParameterNV(int target, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglMapParameterfvNV(target, pname, pfParams, pfParams.position());
}
private static native void nglMapParameterfvNV(int target, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glMapParameterNV(int target, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglMapParameterivNV(target, pname, piParams, piParams.position());
}
private static native void nglMapParameterivNV(int target, int pname, IntBuffer piParams, int piParams_offset);
public static void glGetMapParameterNV(int target, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetMapParameterfvNV(target, pname, pfParams, pfParams.position());
}
private static native void nglGetMapParameterfvNV(int target, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetMapParameterNV(int target, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetMapParameterivNV(target, pname, piParams, piParams.position());
}
private static native void nglGetMapParameterivNV(int target, int pname, IntBuffer piParams, int piParams_offset);
public static void glGetMapAttribParameterNV(int target, int index, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetMapAttribParameterfvNV(target, index, pname, pfParams, pfParams.position());
}
private static native void nglGetMapAttribParameterfvNV(int target, int index, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetMapAttribParameterNV(int target, int index, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetMapAttribParameterivNV(target, index, pname, piParams, piParams.position());
}
private static native void nglGetMapAttribParameterivNV(int target, int index, int pname, IntBuffer piParams, int piParams_offset);
public static native void glEvalMapsNV(int target, int mode);
}

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVFence {
public static final int GL_ALL_COMPLETED_NV = 0x84F2;
public static final int GL_FENCE_STATUS_NV = 0x84F3;
public static final int GL_FENCE_CONDITION_NV = 0x84F4;
@ -50,11 +51,14 @@ public final class NVFence {
BufferChecks.checkDirect(piFences);
nglGenFencesNV(piFences.remaining(), piFences, piFences.position());
}
private static native void nglGenFencesNV(int n, IntBuffer piFences, int piFences_offset);
public static void glDeleteFencesNV(IntBuffer piFences) {
BufferChecks.checkDirect(piFences);
nglDeleteFencesNV(piFences.remaining(), piFences, piFences.position());
}
private static native void nglDeleteFencesNV(int n, IntBuffer piFences, int piFences_offset);
public static native void glSetFenceNV(int fence, int condition);
@ -69,5 +73,6 @@ public final class NVFence {
BufferChecks.checkBuffer(piParams);
nglGetFenceivNV(fence, pname, piParams, piParams.position());
}
private static native void nglGetFenceivNV(int fence, int pname, IntBuffer piParams, int piParams_offset);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVFloatBuffer {
/*
* Accepted by the <internalformat> parameter of TexImage2D and
* CopyTexImage2D:

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVFogDistance {
public static final int GL_FOG_DISTANCE_MODE_NV = 0x855A;
public static final int GL_EYE_RADIAL_NV = 0x855B;
public static final int GL_EYE_PLANE_ABSOLUTE_NV = 0x855C;

View File

@ -38,19 +38,20 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVFragmentProgram extends NVProgram {
/*
Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
<pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,
and by the <target> parameter of BindProgramNV, LoadProgramNV,
ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB,
ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB,
GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB:
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
* <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,
* and by the <target> parameter of BindProgramNV, LoadProgramNV,
* ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB,
* ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB,
* GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB:
*/
public static final int GL_FRAGMENT_PROGRAM_NV = 0x8870;
/*
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
and GetDoublev:
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
* and GetDoublev:
*/
public static final int GL_MAX_TEXTURE_COORDS_NV = 0x8871;
public static final int GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872;
@ -63,40 +64,22 @@ public final class NVFragmentProgram extends NVProgram {
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glProgramNamedParameter4fNV(int id, ByteBuffer name, float x, float y, float z, float w) {
BufferChecks.checkDirect(name);
nglProgramNamedParameter4fNV(id, name.remaining(), name, name.position(), x, y, z, w);
}
private static native void nglProgramNamedParameter4fNV(
int id,
int length,
ByteBuffer name,
int nameOffset,
float x,
float y,
float z,
float w);
private static native void nglProgramNamedParameter4fNV(int id, int length, ByteBuffer name, int nameOffset, float x, float y, float z, float w);
// ---------------------------
// ---------------------------
public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) {
BufferChecks.checkDirect(name);
BufferChecks.checkBuffer(params);
nglGetProgramNamedParameterfvNV(id, name.remaining(), name, name.position(), params, params.position());
}
private static native void nglGetProgramNamedParameterfvNV(
int id,
int length,
ByteBuffer name,
int nameOffset,
FloatBuffer params,
int paramsOffset);
private static native void nglGetProgramNamedParameterfvNV(int id, int length, ByteBuffer name, int nameOffset, FloatBuffer params, int paramsOffset);
// ---------------------------
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVFragmentProgram2 {
/*
* Accepted by the <pname> parameter of GetProgramivARB:
*/

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVHalfFloat {
/*
* Accepted by the <type> argument of VertexPointer, NormalPointer,
* ColorPointer, TexCoordPointer, FogCoordPointerEXT,
@ -97,8 +98,7 @@ public final class NVHalfFloat {
nglVertexAttribs1hvNV(index, attribs.remaining(), attribs, attribs.position());
}
private static native void nglVertexAttribs1hvNV(int index, int n, ShortBuffer attribs,
int attribsOffset);
private static native void nglVertexAttribs1hvNV(int index, int n, ShortBuffer attribs, int attribsOffset);
// ---------------------------
// ---------------------------
@ -107,8 +107,7 @@ public final class NVHalfFloat {
nglVertexAttribs2hvNV(index, attribs.remaining() >> 1, attribs, attribs.position());
}
private static native void nglVertexAttribs2hvNV(int index, int n, ShortBuffer attribs,
int attribsOffset);
private static native void nglVertexAttribs2hvNV(int index, int n, ShortBuffer attribs, int attribsOffset);
// ---------------------------
// ---------------------------
@ -117,8 +116,7 @@ public final class NVHalfFloat {
nglVertexAttribs3hvNV(index, attribs.remaining() / 3, attribs, attribs.position());
}
private static native void nglVertexAttribs3hvNV(int index, int n, ShortBuffer attribs,
int attribsOffset);
private static native void nglVertexAttribs3hvNV(int index, int n, ShortBuffer attribs, int attribsOffset);
// ---------------------------
// ---------------------------
@ -127,8 +125,7 @@ public final class NVHalfFloat {
nglVertexAttribs4hvNV(index, attribs.remaining() >> 2, attribs, attribs.position());
}
private static native void nglVertexAttribs4hvNV(int index, int n, ShortBuffer attribs,
int attribsOffset);
private static native void nglVertexAttribs4hvNV(int index, int n, ShortBuffer attribs, int attribsOffset);
// ---------------------------
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVLightMaxExponent {
public static final int GL_MAX_SHININESS_NV = 0x8504;
public static final int GL_MAX_SPOT_EXPONENT_NV = 0x8505;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVMultisampleFilterHint {
/*
* Accepted by the <target> parameter of Hint and by the <pname>
* parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev:

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVOcclusionQuery {
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
/* HP_occlusion_test */
@ -54,14 +55,18 @@ public final class NVOcclusionQuery {
BufferChecks.checkDirect(piIDs);
nglGenOcclusionQueriesNV(piIDs.remaining(), piIDs, piIDs.position());
}
private static native void nglGenOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_offset);
public static void glDeleteOcclusionQueriesNV(IntBuffer piIDs) {
BufferChecks.checkDirect(piIDs);
nglDeleteOcclusionQueriesNV(piIDs.remaining(), piIDs, piIDs.position());
}
private static native void nglDeleteOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_offset);
public static native boolean glIsOcclusionQueryNV(int id);
public static native void glBeginOcclusionQueryNV(int id);
public static native void glEndOcclusionQueryNV();
@ -70,11 +75,13 @@ public final class NVOcclusionQuery {
BufferChecks.checkBuffer(piParams);
nglGetOcclusionQueryivNV(id, pname, piParams, piParams.position());
}
private static native void nglGetOcclusionQueryivNV(int id, int pname, IntBuffer piParams, int piParams_offset);
public static void glGetOcclusionQueryuNV(int id, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetOcclusionQueryuivNV(id, pname, piParams, piParams.position());
}
private static native void nglGetOcclusionQueryuivNV(int id, int pname, IntBuffer piParams, int piParams_offset);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVPackedDepthStencil {
public static final int GL_DEPTH_STENCIL_NV = 0x84F9;
public static final int GL_UNSIGNED_INT_24_8_NV = 0x84FA;

View File

@ -41,6 +41,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVPixelDataRange {
/*
* Accepted by the <target> parameter of PixelDataRangeNV and
* FlushPixelDataRangeNV, and by the <cap> parameter of
@ -88,8 +89,7 @@ public final class NVPixelDataRange {
nglPixelDataRangeNV(target, data.remaining() << 2, data, data.position() << 2);
}
private static native void nglPixelDataRangeNV(int target, int length, Buffer data,
int dataOffset);
private static native void nglPixelDataRangeNV(int target, int length, Buffer data, int dataOffset);
// ---------------------------
public static native void glFlushPixelDataRangeNV(int target);

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVPointSprite {
public static final int GL_POINT_SPRITE_NV = 0x8861;
public static final int GL_COORD_REPLACE_NV = 0x8862;
public static final int GL_POINT_SPRITE_R_MODE_NV = 0x8863;
@ -52,5 +53,6 @@ public final class NVPointSprite {
BufferChecks.checkBuffer(piParams);
nglPointParameterivNV(pname, piParams, piParams.position());
}
private static native void nglPointParameterivNV(int pname, IntBuffer piParams, int piParams_offset);
}

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class NVPrimitiveRestart {
/*
* Accepted by the <array> parameter of EnableClientState and
* DisableClientState, by the <cap> parameter of IsEnabled, and by

View File

@ -122,18 +122,10 @@ public abstract class NVProgram {
BufferChecks.checkDirect(programResidences);
if ( programIDs.remaining() != programResidences.remaining() )
throw new IllegalArgumentException("programIDs.remaining() != programResidences.remaining()");
return nglAreProgramsResidentNV(programIDs.remaining(),
programIDs,
programIDs.position(),
programResidences,
programResidences.position());
return nglAreProgramsResidentNV(programIDs.remaining(), programIDs, programIDs.position(), programResidences, programResidences.position());
}
private static native boolean nglAreProgramsResidentNV(int n,
IntBuffer programIDs,
int programIDsOffset,
ByteBuffer programResidences,
int programResidencesOffset);
private static native boolean nglAreProgramsResidentNV(int n, IntBuffer programIDs, int programIDsOffset, ByteBuffer programResidences, int programResidencesOffset);
// ---------------------------
// ---------------------------

View File

@ -38,6 +38,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVRegisterCombiners {
public static final int GL_REGISTER_COMBINERS_NV = 0x8522;
public static final int GL_COMBINER0_NV = 0x8550;
public static final int GL_COMBINER1_NV = 0x8551;
@ -101,6 +102,7 @@ public final class NVRegisterCombiners {
BufferChecks.checkBuffer(pfParams);
nglCombinerParameterfvNV(pname, pfParams, pfParams.position());
}
private static native void nglCombinerParameterfvNV(int pname, FloatBuffer pfParams, int pfParams_offset);
public static native void glCombinerParameteriNV(int pname, int param);
@ -109,61 +111,54 @@ public final class NVRegisterCombiners {
BufferChecks.checkBuffer(piParams);
nglCombinerParameterivNV(pname, piParams, piParams.position());
}
private static native void nglCombinerParameterivNV(int pname, IntBuffer piParams, int piParams_offset);
public static native void glCombinerInputNV(
int stage,
int portion,
int variable,
int input,
int mapping,
int componentUsage);
public static native void glCombinerOutputNV(
int stage,
int portion,
int abOutput,
int cdOutput,
int sumOutput,
int scale,
int bias,
boolean abDotProduct,
boolean cdDotProduct,
boolean muxSum);
public static native void glFinalCombinerInputNV(
int variable,
int input,
int mapping,
int componentUsage);
public static native void glCombinerInputNV(int stage, int portion, int variable, int input, int mapping, int componentUsage);
public static native void glCombinerOutputNV(int stage, int portion, int abOutput, int cdOutput, int sumOutput, int scale, int bias, boolean abDotProduct, boolean cdDotProduct, boolean muxSum);
public static native void glFinalCombinerInputNV(int variable, int input, int mapping, int componentUsage);
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetCombinerInputParameterfvNV(stage, portion, variable, pname, pfParams, pfParams.position());
}
private static native void nglGetCombinerInputParameterfvNV(int stage, int portion, int variable, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetCombinerInputParameterivNV(stage, portion, variable, pname, piParams, piParams.position());
}
private static native void nglGetCombinerInputParameterivNV(int stage, int portion, int variable, int pname, IntBuffer piParams, int piParams_offset);
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetCombinerOutputParameterfvNV(stage, portion, pname, pfParams, pfParams.position());
}
private static native void nglGetCombinerOutputParameterfvNV(int stage, int portion, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetCombinerOutputParameterivNV(stage, portion, pname, piParams, piParams.position());
}
private static native void nglGetCombinerOutputParameterivNV(int stage, int portion, int pname, IntBuffer piParams, int pfParams_offset);
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetFinalCombinerInputParameterfvNV(variable, pname, pfParams, pfParams.position());
}
private static native void nglGetFinalCombinerInputParameterfvNV(int variable, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, IntBuffer piParams) {
BufferChecks.checkBuffer(piParams);
nglGetFinalCombinerInputParameterivNV(variable, pname, piParams, piParams.position());
}
private static native void nglGetFinalCombinerInputParameterivNV(int variable, int pname, IntBuffer piParams, int piParams_offset);
}

View File

@ -37,6 +37,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVRegisterCombiners2 {
public static final int GL_PER_STAGE_CONSTANTS_NV = 0x8535;
private NVRegisterCombiners2() {
@ -48,10 +49,13 @@ public final class NVRegisterCombiners2 {
BufferChecks.checkBuffer(pfParams);
nglCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);
nglGetCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglGetCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTexgenReflection {
public static final int GL_NORMAL_MAP_NV = 0x8511;
public static final int GL_REFLECTION_MAP_NV = 0x8512;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureCompressionVTC {
/*
* Accepted by the <internalformat> parameter of TexImage3D and
* CompressedTexImage3DARB and the <format> parameter of

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureEnvCombine4 {
public static final int GL_COMBINE4_NV = 0x8503;
public static final int GL_SOURCE3_RGB_NV = 0x8583;
public static final int GL_SOURCE3_ALPHA_NV = 0x858B;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureExpandNormal {
/*
* Accepted by the <pname> parameters of TexParameteri,
* TexParameteriv, TexParameterf, TexParameterfv, GetTexParameteri,

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureRectangle {
public static final int GL_TEXTURE_RECTANGLE_NV = 0x84F5;
public static final int GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6;
public static final int GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureShader {
public static final int GL_TEXTURE_SHADER_NV = 0x86DE;
public static final int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9;
public static final int GL_SHADER_OPERATION_NV = 0x86DF;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureShader2 {
public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF;
public static final int GL_HILO_NV = 0x86F4;
public static final int GL_DSDT_NV = 0x86F5;

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVTextureShader3 {
public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850;
public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851;
public static final int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852;

View File

@ -38,6 +38,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVVertexArrayRange {
public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D;
public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E;
public static final int GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F;
@ -53,21 +54,16 @@ public final class NVVertexArrayRange {
BufferChecks.checkDirect(pPointer);
nglVertexArrayRangeNV(pPointer.remaining(), pPointer, pPointer.position());
}
private static native void nglVertexArrayRangeNV(int size, Buffer pPointer, int pPointer_offset);
public static native void glFlushVertexArrayRangeNV();
public static native ByteBuffer glXAllocateMemoryNV(
int size,
float readFrequency,
float writeFrequency,
float priority);
public static native ByteBuffer glXAllocateMemoryNV(int size, float readFrequency, float writeFrequency, float priority);
private static native void glXFreeMemoryNV(ByteBuffer pointer);
public static native ByteBuffer wglAllocateMemoryNV(
int size,
float readFrequency,
float writeFrequency,
float priority);
public static native ByteBuffer wglAllocateMemoryNV(int size, float readFrequency, float writeFrequency, float priority);
public static native void wglFreeMemoryNV(ByteBuffer pointer);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVVertexArrayRange2 {
public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533;
private NVVertexArrayRange2() {

View File

@ -42,6 +42,7 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.BufferChecks;
public final class NVVertexProgram extends NVProgram {
/*
Accepted by the <cap> parameter of Disable, Enable, and IsEnabled,
and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
@ -218,12 +219,7 @@ public final class NVVertexProgram extends NVProgram {
nglGetProgramParameterfvNV(target, index, parameterName, params, params.position());
}
private static native void nglGetProgramParameterfvNV(
int target,
int index,
int parameterName,
FloatBuffer params,
int paramsOffset);
private static native void nglGetProgramParameterfvNV(int target, int index, int parameterName, FloatBuffer params, int paramsOffset);
// ---------------------------
@ -235,12 +231,7 @@ public final class NVVertexProgram extends NVProgram {
}
private static native void nglGetTrackMatrixivNV(
int target,
int address,
int parameterName,
IntBuffer params,
int paramsOffset);
private static native void nglGetTrackMatrixivNV(int target, int address, int parameterName, IntBuffer params, int paramsOffset);
// ---------------------------
@ -282,12 +273,7 @@ public final class NVVertexProgram extends NVProgram {
}
private static native void nglProgramParameters4fvNV(
int target,
int index,
int count,
FloatBuffer params,
int paramsOffset);
private static native void nglProgramParameters4fvNV(int target, int index, int count, FloatBuffer params, int paramsOffset);
// ---------------------------
@ -296,25 +282,13 @@ public final class NVVertexProgram extends NVProgram {
public static void glVertexAttribPointerNV(int index, int size, boolean unsigned, int stride, ByteBuffer buffer) {
BufferChecks.checkDirect(buffer);
GLBufferChecks.ensureArrayVBOdisabled();
nglVertexAttribPointerNV(
index,
size,
unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE,
stride,
buffer,
buffer.position());
nglVertexAttribPointerNV(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, buffer, buffer.position());
}
public static void glVertexAttribPointerNV(int index, int size, boolean unsigned, int stride, ShortBuffer buffer) {
BufferChecks.checkDirect(buffer);
GLBufferChecks.ensureArrayVBOdisabled();
nglVertexAttribPointerNV(
index,
size,
unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT,
stride,
buffer,
buffer.position() << 1);
nglVertexAttribPointerNV(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, buffer, buffer.position() << 1);
}
public static void glVertexAttribPointerNV(int index, int size, int stride, FloatBuffer buffer) {
@ -326,22 +300,10 @@ public final class NVVertexProgram extends NVProgram {
public static void glVertexAttribPointerNV(int index, int size, boolean unsigned, int stride, IntBuffer buffer) {
BufferChecks.checkDirect(buffer);
GLBufferChecks.ensureArrayVBOdisabled();
nglVertexAttribPointerNV(
index,
size,
unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT,
stride,
buffer,
buffer.position() << 2);
nglVertexAttribPointerNV(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, buffer, buffer.position() << 2);
}
private static native void nglVertexAttribPointerNV(
int index,
int size,
int type,
int stride,
Buffer buffer,
int bufferOffset);
private static native void nglVertexAttribPointerNV(int index, int size, int type, int stride, Buffer buffer, int bufferOffset);
// ---------------------------
@ -376,53 +338,62 @@ public final class NVVertexProgram extends NVProgram {
BufferChecks.checkDirect(v);
nglVertexAttribs1svNV(index, v.remaining(), v, v.position() << 1);
}
private static native void nglVertexAttribs1svNV(int index, int n, ShortBuffer v, int v_offset);
public static void glVertexAttribs1NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs1fvNV(index, v.remaining(), v, v.position() << 2);
}
private static native void nglVertexAttribs1fvNV(int index, int n, FloatBuffer v, int v_offset);
public static void glVertexAttribs2NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs2svNV(index, v.remaining() >> 1, v, v.position() << 1);
}
private static native void nglVertexAttribs2svNV(int index, int n, ShortBuffer v, int v_offset);
public static void glVertexAttribs2NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs2fvNV(index, v.remaining() >> 1, v, v.position() << 2);
}
private static native void nglVertexAttribs2fvNV(int index, int n, FloatBuffer v, int v_offset);
public static void glVertexAttribs3NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs3svNV(index, v.remaining() / 3, v, v.position() << 1);
}
private static native void nglVertexAttribs3svNV(int index, int n, ShortBuffer v, int v_offset);
public static void glVertexAttribs3NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs3fvNV(index, v.remaining() / 3, v, v.position() << 2);
}
private static native void nglVertexAttribs3fvNV(int index, int n, FloatBuffer v, int v_offset);
public static void glVertexAttribs4NV(int index, ShortBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs4svNV(index, v.remaining() >> 2, v, v.position() << 1);
}
private static native void nglVertexAttribs4svNV(int index, int n, ShortBuffer v, int v_offset);
public static void glVertexAttribs4NV(int index, FloatBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs4fvNV(index, v.remaining() >> 2, v, v.position() << 2);
}
private static native void nglVertexAttribs4fvNV(int index, int n, FloatBuffer v, int v_offset);
public static void glVertexAttribs4uNV(int index, ByteBuffer v) {
BufferChecks.checkDirect(v);
nglVertexAttribs4ubvNV(index, v.remaining() >> 2, v, v.position());
}
private static native void nglVertexAttribs4ubvNV(int index, int n, ByteBuffer v, int v_offset);
}

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVVertexProgram2Option {
/*
* Accepted by the <pname> parameter of GetProgramivARB:
*/

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
public final class NVVertexProgram3 {
/*
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
* GetFloatv, and GetDoublev:

View File

@ -35,36 +35,32 @@ import org.lwjgl.opengl.glu.GLU;
/**
* $Id$
*
* Thrown by the debug build library of the LWJGL if any OpenGL operation
* causes an error.
* <p/>
* Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public class OpenGLException extends RuntimeException {
/**
* Constructor for OpenGLException.
*/
/** Constructor for OpenGLException. */
public OpenGLException(int gl_error_code) {
this(createErrorMessage(gl_error_code));
}
private final static String createErrorMessage(int gl_error_code) {
private static String createErrorMessage(int gl_error_code) {
String error_string = GLU.gluErrorString(gl_error_code);
return error_string + " (" + gl_error_code + ")";
}
/**
* Constructor for OpenGLException.
*/
/** Constructor for OpenGLException. */
public OpenGLException() {
super();
}
/**
* Constructor for OpenGLException.
*
* @param message
*/
public OpenGLException(String message) {
@ -73,6 +69,7 @@ public class OpenGLException extends RuntimeException {
/**
* Constructor for OpenGLException.
*
* @param message
* @param cause
*/
@ -82,6 +79,7 @@ public class OpenGLException extends RuntimeException {
/**
* Constructor for OpenGLException.
*
* @param cause
*/
public OpenGLException(Throwable cause) {

View File

@ -35,9 +35,7 @@ import org.lwjgl.BufferUtils;
import java.nio.IntBuffer;
/**
* This class represents the state necessary for render-to-texture.
*/
/** This class represents the state necessary for render-to-texture. */
public final class RenderTexture {
// ----------------------------------------------------------------------------------
@ -168,24 +166,16 @@ public final class RenderTexture {
*/
static final int WGL_DEPTH_COMPONENT_NV = 0x20A7;
/**
* The TEXTURE_1D target.
*/
/** The TEXTURE_1D target. */
public static final int RENDER_TEXTURE_1D = WGL_TEXTURE_1D_ARB;
/**
* The TEXTURE_2D target.
*/
/** The TEXTURE_2D target. */
public static final int RENDER_TEXTURE_2D = WGL_TEXTURE_2D_ARB;
/**
* The TEXTURE_RECTANGLE target.
*/
/** The TEXTURE_RECTANGLE target. */
public static final int RENDER_TEXTURE_RECTANGLE = WGL_TEXTURE_RECTANGLE_NV;
/**
* The TEXTURE_CUBE_MAP target.
*/
/** The TEXTURE_CUBE_MAP target. */
public static final int RENDER_TEXTURE_CUBE_MAP = WGL_TEXTURE_CUBE_MAP_ARB;
IntBuffer pixelFormatCaps;
@ -200,10 +190,7 @@ public final class RenderTexture {
* <p/>
* NOTE: The target parameter can be one of the following:
* <p/>
* RENDER_TEXTURE_1D
* RENDER_TEXTURE_2D
* RENDER_TEXTURE_RECTANGLE
* RENDER_TEXTURE_CUBE_MAP
* RENDER_TEXTURE_1D RENDER_TEXTURE_2D RENDER_TEXTURE_RECTANGLE RENDER_TEXTURE_CUBE_MAP
*
* @param useRGB - When true the P-buffer can be used as an RGB render texture.
* @param useRGBA - When true the P-buffer can be used as an RGBA render texture.

View File

@ -32,6 +32,7 @@
package org.lwjgl.opengl;
class StateStack {
/** Only int state is tracked */
private final int[] state_stack;
private int stack_pos;

View File

@ -46,10 +46,9 @@ public final class Util {
private static final IntBuffer int_buffer = BufferUtils.createIntBuffer(16);
/**
* No c'tor
*/
private Util() {}
/** No c'tor */
private Util() {
}
public static void checkGLError() {
int err = GL11.glGetError();
@ -60,7 +59,9 @@ public final class Util {
/**
* 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) {
@ -68,17 +69,19 @@ public final class Util {
return int_buffer.get(0);
}
/**
* Handy mutable integer value class
*/
/** Handy mutable integer value class */
static final class IntValue {
int value;
IntValue(int value) {
this.value = value;
}
public boolean equals(Object obj) {
return ((IntValue)obj).value == value;
}
public int hashCode() {
return value;
}

View File

@ -34,11 +34,10 @@ package org.lwjgl.opengl;
import java.util.WeakHashMap;
import java.util.Map;
/**
* Track Vertex Buffer Objects by context.
*/
/** Track Vertex Buffer Objects by context. */
class VBOTracker {
private static VBOTracker current_tracker = null;
private static VBOTracker current_tracker;
private static final Map contextToTracker = new WeakHashMap(3, 1.0f);
@ -66,8 +65,8 @@ class VBOTracker {
}
/**
* Called after a GLContext has been made current. This will set up the current
* VBO tracker.
* Called after a GLContext has been made current. This will set up the current VBO tracker.
*
* @param context
*/
static void setCurrent(Object context) {

File diff suppressed because it is too large Load Diff

View File

@ -468,11 +468,10 @@ public class GLImpl implements IGL {
}
/**
* @param n
* @param lists
*/
public void glCallLists(int n, IntBuffer lists) {
GL.glCallLists(n, lists);
public void glCallLists(IntBuffer lists) {
GL.glCallLists(lists);
}
/**

View File

@ -99,10 +99,9 @@ public interface IGL {
void glCallLists(ByteBuffer lists);
/**
* @param n
* @param lists
*/
void glCallLists(int n, IntBuffer lists);
void glCallLists(IntBuffer lists);
/**
* @param lists