Renamed CoreGL* to GL* and merged CoreGL*Constants

This commit is contained in:
Elias Naur 2004-01-20 11:19:13 +00:00
parent 038108fb76
commit 6deb142378
41 changed files with 13243 additions and 312 deletions

View File

@ -262,11 +262,10 @@
<class name="org.lwjgl.openal.eax.EAXBufferProperties"/>
<class name="org.lwjgl.openal.eax.EAXListenerProperties"/>
<class name="org.lwjgl.opengl.CoreGL11"/>
<class name="org.lwjgl.opengl.CoreGL12"/>
<class name="org.lwjgl.opengl.CoreGL13"/>
<class name="org.lwjgl.opengl.CoreGL14"/>
<class name="org.lwjgl.opengl.GL"/>
<class name="org.lwjgl.opengl.GL11"/>
<class name="org.lwjgl.opengl.GL12"/>
<class name="org.lwjgl.opengl.GL13"/>
<class name="org.lwjgl.opengl.GL14"/>
<class name="org.lwjgl.opengl.GLU"/>
<class name="org.lwjgl.opengl.GLCaps"/>
<class name="org.lwjgl.opengl.Window"/>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,352 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.opengl;
import java.nio.*;
import java.nio.IntBuffer;
import java.nio.FloatBuffer;
import java.nio.Buffer;
/**
* $Id$
*
* The core OpenGL1.2.1 API, with the imaging subset.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public abstract class GL12 extends GL11 {
public static final int GL_RESCALE_NORMAL = 0x803A;
public static final int GL_CLAMP_TO_EDGE = 0x812F;
public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8;
public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9;
public static final int GL_BGR = 0x80E0;
public static final int GL_BGRA = 0x80E1;
public static final int GL_UNSIGNED_BYTE_3_3_2 = 0x8032;
public static final int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362;
public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
public static final int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364;
public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365;
public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
public static final int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366;
public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035;
public static final int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367;
public static final int GL_UNSIGNED_INT_10_10_10_2 = 0x8036;
public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368;
public static final int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8;
public static final int GL_SINGLE_COLOR = 0x81F9;
public static final int GL_SEPARATE_SPECULAR_COLOR = 0x81FA;
public static final int GL_TEXTURE_MIN_LOD = 0x813A;
public static final int GL_TEXTURE_MAX_LOD = 0x813B;
public static final int GL_TEXTURE_BASE_LEVEL = 0x813C;
public static final int GL_TEXTURE_MAX_LEVEL = 0x813D;
public static final int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12;
public static final int GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13;
public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
public static final int GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23;
public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
public static final int GL_PACK_SKIP_IMAGES = 0x806B;
public static final int GL_PACK_IMAGE_HEIGHT = 0x806C;
public static final int GL_UNPACK_SKIP_IMAGES = 0x806D;
public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E;
public static final int GL_TEXTURE_3D = 0x806F;
public static final int GL_PROXY_TEXTURE_3D = 0x8070;
public static final int GL_TEXTURE_DEPTH = 0x8071;
public static final int GL_TEXTURE_WRAP_R = 0x8072;
public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073;
public static final int GL_TEXTURE_BINDING_3D = 0x806A;
public static final int GL_COLOR_TABLE = 0x80D0;
public static final int GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1;
public static final int GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2;
public static final int GL_PROXY_COLOR_TABLE = 0x80D3;
public static final int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4;
public static final int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5;
public static final int GL_COLOR_TABLE_SCALE = 0x80D6;
public static final int GL_COLOR_TABLE_BIAS = 0x80D7;
public static final int GL_COLOR_TABLE_FORMAT = 0x80D8;
public static final int GL_COLOR_TABLE_WIDTH = 0x80D9;
public static final int GL_COLOR_TABLE_RED_SIZE = 0x80DA;
public static final int GL_COLOR_TABLE_GREEN_SIZE = 0x80DB;
public static final int GL_COLOR_TABLE_BLUE_SIZE = 0x80DC;
public static final int GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD;
public static final int GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE;
public static final int GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF;
public static final int GL_CONVOLUTION_1D = 0x8010;
public static final int GL_CONVOLUTION_2D = 0x8011;
public static final int GL_SEPARABLE_2D = 0x8012;
public static final int GL_CONVOLUTION_BORDER_MODE = 0x8013;
public static final int GL_CONVOLUTION_FILTER_SCALE = 0x8014;
public static final int GL_CONVOLUTION_FILTER_BIAS = 0x8015;
public static final int GL_REDUCE = 0x8016;
public static final int GL_CONVOLUTION_FORMAT = 0x8017;
public static final int GL_CONVOLUTION_WIDTH = 0x8018;
public static final int GL_CONVOLUTION_HEIGHT = 0x8019;
public static final int GL_MAX_CONVOLUTION_WIDTH = 0x801A;
public static final int GL_MAX_CONVOLUTION_HEIGHT = 0x801B;
public static final int GL_POST_CONVOLUTION_RED_SCALE = 0x801C;
public static final int GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D;
public static final int GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E;
public static final int GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F;
public static final int GL_POST_CONVOLUTION_RED_BIAS = 0x8020;
public static final int GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021;
public static final int GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022;
public static final int GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023;
public static final int GL_CONSTANT_BORDER = 0x8151;
public static final int GL_REPLICATE_BORDER = 0x8153;
public static final int GL_CONVOLUTION_BORDER_COLOR = 0x8154;
public static final int GL_COLOR_MATRIX = 0x80B1;
public static final int GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2;
public static final int GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3;
public static final int GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4;
public static final int GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5;
public static final int GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6;
public static final int GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7;
public static final int GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8;
public static final int GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9;
public static final int GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA;
public static final int GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB;
public static final int GL_HISTOGRAM = 0x8024;
public static final int GL_PROXY_HISTOGRAM = 0x8025;
public static final int GL_HISTOGRAM_WIDTH = 0x8026;
public static final int GL_HISTOGRAM_FORMAT = 0x8027;
public static final int GL_HISTOGRAM_RED_SIZE = 0x8028;
public static final int GL_HISTOGRAM_GREEN_SIZE = 0x8029;
public static final int GL_HISTOGRAM_BLUE_SIZE = 0x802A;
public static final int GL_HISTOGRAM_ALPHA_SIZE = 0x802B;
public static final int GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C;
public static final int GL_HISTOGRAM_SINK = 0x802D;
public static final int GL_MINMAX = 0x802E;
public static final int GL_MINMAX_FORMAT = 0x802F;
public static final int GL_MINMAX_SINK = 0x8030;
public static final int GL_TABLE_TOO_LARGE = 0x8031;
public static final int GL_BLEND_EQUATION = 0x8009;
public static final int GL_MIN = 0x8007;
public static final int GL_MAX = 0x8008;
public static final int GL_FUNC_ADD = 0x8006;
public static final int GL_FUNC_SUBTRACT = 0x800A;
public static final int GL_FUNC_REVERSE_SUBTRACT = 0x800B;
public static final int GL_BLEND_COLOR = 0x8005;
public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) {
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) {
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) {
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) {
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) {
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) {
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) {
nglGetColorTable(target, format, type, data, data.position());
}
public static void glGetColorTable(int target, int format, int type, FloatBuffer data) {
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) {
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) {
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) {
nglGetHistogram(target, reset, format, type, values, values.position());
}
public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) {
nglGetHistogram(target, reset, format, type, values, values.position() << 1);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) {
nglGetHistogram(target, reset, format, type, values, values.position() << 2);
}
public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) {
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) {
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) {
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) {
nglGetMinmax(target, reset, format, types, values, values.position());
}
public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) {
nglGetMinmax(target, reset, format, types, values, values.position() << 1);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) {
nglGetMinmax(target, reset, format, types, values, values.position() << 2);
}
public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer 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) {
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) {
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) {
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) {
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) {
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) {
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, Buffer image) {
}
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) {
}
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) {
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) {
nglGetConvolutionFilter(target, format, type, image, image.position());
}
public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) {
nglGetConvolutionFilter(target, format, type, image, image.position() << 1);
}
public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) {
nglGetConvolutionFilter(target, format, type, image, image.position() << 2);
}
public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) {
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) {
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) {
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) {
nglSeparableFilter2D(target, internalformat, width, height, format, type, row, Util.getOffset(row), column, Util.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) {
nglGetSeparableFilter(target, format, type, row, Util.getOffset(row), column, Util.getOffset(column), span, Util.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);
public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElements(mode, start, end, indices.remaining(), GL_UNSIGNED_BYTE, indices, indices.position());
}
public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElements(mode, start, end, indices.remaining(), GL_UNSIGNED_SHORT, indices, indices.position() << 1);
}
public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElements(mode, start, end, indices.remaining(), GL_UNSIGNED_INT, indices, indices.position() << 2);
}
private static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices, int indices_offset);
public static void glDrawRangeElements(int mode, int start, int end, int count, int type, int buffer_offset) {
assert VBOTracker.getVBOElementStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
nglDrawRangeElementsVBO(mode, start, end, count, type, buffer_offset);
}
private static native void nglDrawRangeElementsVBO(int mode, int start, int end, int count, int type, int buffer_offset);
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) {
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position());
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) {
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 1);
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) {
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2);
}
public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) {
nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2);
}
private static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels, int pixels_offset);
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) {
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position());
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) {
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 1);
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) {
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2);
}
public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) {
nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2);
}
private static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels, int pixels_offset);
public static native void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height);
}

View File

@ -0,0 +1,253 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.opengl;
import java.nio.*;
/**
* $Id$
*
* The core OpenGL1.3 API.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public abstract class GL13 extends GL12 {
public static final int GL_TEXTURE0 = 0x84C0;
public static final int GL_TEXTURE1 = 0x84C1;
public static final int GL_TEXTURE2 = 0x84C2;
public static final int GL_TEXTURE3 = 0x84C3;
public static final int GL_TEXTURE4 = 0x84C4;
public static final int GL_TEXTURE5 = 0x84C5;
public static final int GL_TEXTURE6 = 0x84C6;
public static final int GL_TEXTURE7 = 0x84C7;
public static final int GL_TEXTURE8 = 0x84C8;
public static final int GL_TEXTURE9 = 0x84C9;
public static final int GL_TEXTURE10 = 0x84CA;
public static final int GL_TEXTURE11 = 0x84CB;
public static final int GL_TEXTURE12 = 0x84CC;
public static final int GL_TEXTURE13 = 0x84CD;
public static final int GL_TEXTURE14 = 0x84CE;
public static final int GL_TEXTURE15 = 0x84CF;
public static final int GL_TEXTURE16 = 0x84D0;
public static final int GL_TEXTURE17 = 0x84D1;
public static final int GL_TEXTURE18 = 0x84D2;
public static final int GL_TEXTURE19 = 0x84D3;
public static final int GL_TEXTURE20 = 0x84D4;
public static final int GL_TEXTURE21 = 0x84D5;
public static final int GL_TEXTURE22 = 0x84D6;
public static final int GL_TEXTURE23 = 0x84D7;
public static final int GL_TEXTURE24 = 0x84D8;
public static final int GL_TEXTURE25 = 0x84D9;
public static final int GL_TEXTURE26 = 0x84DA;
public static final int GL_TEXTURE27 = 0x84DB;
public static final int GL_TEXTURE28 = 0x84DC;
public static final int GL_TEXTURE29 = 0x84DD;
public static final int GL_TEXTURE30 = 0x84DE;
public static final int GL_TEXTURE31 = 0x84DF;
public static final int GL_ACTIVE_TEXTURE = 0x84E0;
public static final int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1;
public static final int GL_MAX_TEXTURE_UNITS = 0x84E2;
public static final int GL_NORMAL_MAP = 0x8511;
public static final int GL_REFLECTION_MAP = 0x8512;
public static final int GL_TEXTURE_CUBE_MAP = 0x8513;
public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
public static final int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B;
public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
public static final int GL_COMPRESSED_ALPHA = 0x84E9;
public static final int GL_COMPRESSED_LUMINANCE = 0x84EA;
public static final int GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB;
public static final int GL_COMPRESSED_INTENSITY = 0x84EC;
public static final int GL_COMPRESSED_RGB = 0x84ED;
public static final int GL_COMPRESSED_RGBA = 0x84EE;
public static final int GL_TEXTURE_COMPRESSION_HINT = 0x84EF;
public static final int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0;
public static final int GL_TEXTURE_COMPRESSED = 0x86A1;
public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
public static final int GL_MULTISAMPLE = 0x809D;
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
public static final int GL_SAMPLE_ALPHA_TO_ONE = 0x809F;
public static final int GL_SAMPLE_COVERAGE = 0x80A0;
public static final int GL_SAMPLE_BUFFERS = 0x80A8;
public static final int GL_SAMPLES = 0x80A9;
public static final int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
public static final int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
public static final int GL_MULTISAMPLE_BIT = 0x20000000;
public static final int GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3;
public static final int GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4;
public static final int GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5;
public static final int GL_TRANSPOSE_COLOR_MATRIX = 0x84E6;
public static final int GL_COMBINE = 0x8570;
public static final int GL_COMBINE_RGB = 0x8571;
public static final int GL_COMBINE_ALPHA = 0x8572;
public static final int GL_SOURCE0_RGB = 0x8580;
public static final int GL_SOURCE1_RGB = 0x8581;
public static final int GL_SOURCE2_RGB = 0x8582;
public static final int GL_SOURCE0_ALPHA = 0x8588;
public static final int GL_SOURCE1_ALPHA = 0x8589;
public static final int GL_SOURCE2_ALPHA = 0x858A;
public static final int GL_OPERAND0_RGB = 0x8590;
public static final int GL_OPERAND1_RGB = 0x8591;
public static final int GL_OPERAND2_RGB = 0x8592;
public static final int GL_OPERAND0_ALPHA = 0x8598;
public static final int GL_OPERAND1_ALPHA = 0x8599;
public static final int GL_OPERAND2_ALPHA = 0x859A;
public static final int GL_RGB_SCALE = 0x8573;
public static final int GL_ADD_SIGNED = 0x8574;
public static final int GL_INTERPOLATE = 0x8575;
public static final int GL_SUBTRACT = 0x84E7;
public static final int GL_CONSTANT = 0x8576;
public static final int GL_PRIMARY_COLOR = 0x8577;
public static final int GL_PREVIOUS = 0x8578;
public static final int GL_DOT3_RGB = 0x86AE;
public static final int GL_DOT3_RGBA = 0x86AF;
public static final int GL_CLAMP_TO_BORDER = 0x812D;
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
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) {
nglGetCompressedTexImage(target, lod, img, img.position());
}
public static void glGetCompressedTexImage(int target, int lod, ShortBuffer img) {
nglGetCompressedTexImage(target, lod, img, img.position() << 1);
}
public static void glGetCompressedTexImage(int target, int lod, IntBuffer img) {
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) {
nglLoadTransposeMatrixf(m, m.position());
}
private static native void nglLoadTransposeMatrixf(FloatBuffer m, int m_offset);
public static void glMultTransposeMatrix(FloatBuffer m) {
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

@ -0,0 +1,134 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.lwjgl.opengl;
import java.nio.*;
import java.nio.IntBuffer;
import java.nio.FloatBuffer;
import java.nio.Buffer;
/**
* $Id$
*
* The core OpenGL1.4 API.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public abstract class GL14 extends GL13 {
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;
public static final int GL_DEPTH_COMPONENT24 = 0x81A6;
public static final int GL_DEPTH_COMPONENT32 = 0x81A7;
public static final int GL_TEXTURE_DEPTH_SIZE = 0x884A;
public static final int GL_DEPTH_TEXTURE_MODE = 0x884B;
public static final int GL_TEXTURE_COMPARE_MODE = 0x884C;
public static final int GL_TEXTURE_COMPARE_FUNC = 0x884D;
public static final int GL_COMPARE_R_TO_TEXTURE = 0x884E;
public static final int GL_FOG_COORDINATE_SOURCE = 0x8450;
public static final int GL_FOG_COORDINATE = 0x8451;
public static final int GL_FRAGMENT_DEPTH = 0x8452;
public static final int GL_CURRENT_FOG_COORDINATE = 0x8453;
public static final int GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454;
public static final int GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455;
public static final int GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456;
public static final int GL_FOG_COORDINATE_ARRAY = 0x8457;
public static final int GL_POINT_SIZE_MIN = 0x8126;
public static final int GL_POINT_SIZE_MAX = 0x8127;
public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128;
public static final int GL_POINT_DISTANCE_ATTENUATION = 0x8129;
public static final int GL_COLOR_SUM = 0x8458;
public static final int GL_CURRENT_SECONDARY_COLOR = 0x8459;
public static final int GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A;
public static final int GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B;
public static final int GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C;
public static final int GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D;
public static final int GL_SECONDARY_COLOR_ARRAY = 0x845E;
public static final int GL_BLEND_DST_RGB = 0x80C8;
public static final int GL_BLEND_SRC_RGB = 0x80C9;
public static final int GL_BLEND_DST_ALPHA = 0x80CA;
public static final int GL_BLEND_SRC_ALPHA = 0x80CB;
public static final int GL_INCR_WRAP = 0x8507;
public static final int GL_DECR_WRAP = 0x8508;
public static final int GL_TEXTURE_FILTER_CONTROL = 0x8500;
public static final int GL_TEXTURE_LOD_BIAS = 0x8501;
public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD;
public static final int GL_GL_MIRRORED_REPEAT = 0x8370;
public static native void glFogCoordf(float coord);
public static void glFogCoordPointer(int stride, FloatBuffer data) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglFogCoordPointer(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) {
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
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) {
assert piFirst.remaining() == piCount.remaining(): "piFirst.remaining() != piCount.remaining()";
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) {
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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglSecondaryColorPointer(size, unsigned ? GL_UNSIGNED_BYTE : GL_BYTE, stride, data, data.position());
}
public static void glSecondaryColorPointer(int size, int stride, FloatBuffer data) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglSecondaryColorPointer(size, 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) {
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
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

@ -52,8 +52,8 @@ public interface GLUConstants {
public static final int GLU_EXTENSIONS = 100801;
/* Boolean */
public static final int GLU_TRUE = CoreGL11Constants.GL_TRUE;
public static final int GLU_FALSE = CoreGL11Constants.GL_FALSE;
public static final int GLU_TRUE = GL11.GL_TRUE;
public static final int GLU_FALSE = GL11.GL_FALSE;
}

View File

@ -39,6 +39,7 @@ import java.nio.*;
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
abstract class Util {
private final static IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
/**
@ -58,7 +59,7 @@ abstract class Util {
}
static int getGLInteger(int gl_enum) {
CoreGL11.glGetInteger(gl_enum, int_buffer);
GL11.glGetInteger(gl_enum, int_buffer);
return int_buffer.get(0);
}
}

View File

@ -49,7 +49,7 @@ public class VBOTracker {
}
public VBOTracker() {
int stack_size = Util.getGLInteger(CoreGL11Constants.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH);
int stack_size = Util.getGLInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH);
vbo_array_stack = new StateStack(stack_size, 0);
vbo_element_stack = new StateStack(stack_size, 0);
attrib_stack = new StateStack(stack_size, 0);

View File

@ -45,7 +45,7 @@ import java.nio.ShortBuffer;
import java.nio.IntBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class ARBMatrixPalette {
public static final int GL_MATRIX_PALETTE_ARB = 0x8840;
@ -62,15 +62,15 @@ public class ARBMatrixPalette {
public static native void glCurrentPaletteMatrixARB(int index);
public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglMatrixIndexPointerARB(size, CoreGL11Constants.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position());
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position());
}
public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglMatrixIndexPointerARB(size, CoreGL11Constants.GL_UNSIGNED_SHORT, stride, pPointer, pPointer.position()<<1);
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_SHORT, stride, pPointer, pPointer.position()<<1);
}
public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglMatrixIndexPointerARB(size, CoreGL11Constants.GL_UNSIGNED_INT, stride, pPointer, pPointer.position()<<2);
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) {

View File

@ -46,7 +46,7 @@ import java.nio.IntBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class ARBVertexBlend {
public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4;
@ -129,19 +129,19 @@ public class ARBVertexBlend {
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglWeightPointerARB(size, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.GL_BYTE, stride, pPointer, pPointer.position());
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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglWeightPointerARB(size, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, stride, pPointer, pPointer.position()<<1);
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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglWeightPointerARB(size, CoreGL11Constants.GL_FLOAT, stride, pPointer, pPointer.position()<<2);
nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position()<<2);
}
public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglWeightPointerARB(size, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.GL_INT, stride, pPointer, pPointer.position()<<2);
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) {

View File

@ -38,7 +38,7 @@
package org.lwjgl.opengl.arb;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.VBOTracker;
import java.nio.Buffer;
import java.nio.ByteBuffer;
@ -286,22 +286,22 @@ public class ARBVertexProgram extends ARBProgram {
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerARB(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.GL_BYTE, normalized, stride, buffer, buffer.position());
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());
}
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerARB(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, normalized, stride, buffer, buffer.position() << 1);
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1);
}
public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerARB(index, size, CoreGL11Constants.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2);
nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2);
}
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerARB(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.GL_INT, normalized, stride, buffer, buffer.position() << 2);
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2);
}
private static native void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, Buffer buffer, int bufferOffset);

View File

@ -46,7 +46,7 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class ATIElementArray {
public static final int GL_ELEMENT_ARRAY_ATI = 0x8768;
@ -55,15 +55,15 @@ public class ATIElementArray {
public static void glElementPointerATI(ByteBuffer pPointer) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglElementPointerATI(CoreGL11Constants.GL_UNSIGNED_BYTE, pPointer, pPointer.position());
nglElementPointerATI(GL11.GL_UNSIGNED_BYTE, pPointer, pPointer.position());
}
public static void glElementPointerATI(ShortBuffer pPointer) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglElementPointerATI(CoreGL11Constants.GL_UNSIGNED_SHORT, pPointer, pPointer.position()<<1);
nglElementPointerATI(GL11.GL_UNSIGNED_SHORT, pPointer, pPointer.position()<<1);
}
public static void glElementPointerATI(IntBuffer pPointer) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglElementPointerATI(CoreGL11Constants.GL_UNSIGNED_INT, pPointer, pPointer.position()<<2);
nglElementPointerATI(GL11.GL_UNSIGNED_INT, pPointer, pPointer.position()<<2);
}
private static native void nglElementPointerATI(int type, Buffer pPointer, int pPointer_offset);

View File

@ -45,7 +45,7 @@ import java.nio.ShortBuffer;
import java.nio.IntBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class EXTDrawRangeElements {
public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
@ -53,15 +53,15 @@ public class EXTDrawRangeElements {
public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), CoreGL11Constants.GL_UNSIGNED_BYTE, pIndices, pIndices.position());
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) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), CoreGL11Constants.GL_UNSIGNED_SHORT, pIndices, pIndices.position()<<1);
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) {
assert VBOTracker.getVBOElementStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), CoreGL11Constants.GL_UNSIGNED_INT, pIndices, pIndices.position()<<2);
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);

View File

@ -43,7 +43,7 @@ import java.nio.Buffer;
import java.nio.FloatBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class EXTFogCoord {
public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450;
@ -58,7 +58,7 @@ public class EXTFogCoord {
public static native void glFogCoordfEXT(float coord);
public static void glFogCoordPointerEXT(int stride, FloatBuffer data) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglFogCoordPointerEXT(CoreGL11Constants.GL_FLOAT, stride, data, data.position() << 2);
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) {

View File

@ -44,7 +44,7 @@ import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class EXTSecondaryColor {
public static final int GL_COLOR_SUM_EXT = 0x8458;
@ -63,11 +63,11 @@ public class EXTSecondaryColor {
public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglSecondaryColorPointerEXT(size, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE: CoreGL11Constants.GL_BYTE, stride, pPointer, pPointer.position());
nglSecondaryColorPointerEXT(size, unsigned ? GL11.GL_UNSIGNED_BYTE: GL11.GL_BYTE, stride, pPointer, pPointer.position());
}
public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglSecondaryColorPointerEXT(size, CoreGL11Constants.GL_FLOAT, stride, pPointer, pPointer.position()<<2);
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);

View File

@ -45,7 +45,7 @@ import java.nio.ShortBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.VBOTracker;
public class EXTVertexShader {
@ -205,30 +205,30 @@ public class EXTVertexShader {
int range,
int components);
public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
nglSetInvariantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.GL_BYTE, pAddr, pAddr.position());
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position());
}
public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
nglSetInvariantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, pAddr, pAddr.position()<<1);
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position()<<1);
}
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
nglSetInvariantEXT(id, CoreGL11Constants.GL_FLOAT, pAddr, pAddr.position()<<2);
nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position()<<2);
}
public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) {
nglSetInvariantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.GL_INT, pAddr, pAddr.position()<<2);
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) {
nglSetLocalConstantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.GL_BYTE, pAddr, pAddr.position());
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position());
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
nglSetLocalConstantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, pAddr, pAddr.position()<<1);
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position()<<1);
}
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
nglSetLocalConstantEXT(id, CoreGL11Constants.GL_FLOAT, pAddr, pAddr.position()<<2);
nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position()<<2);
}
public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) {
nglSetLocalConstantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.GL_INT, pAddr, pAddr.position()<<2);
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);
@ -268,19 +268,19 @@ public class EXTVertexShader {
private static native void nglVariantuivEXT(int id, IntBuffer piAddr, int piAddr_offset);
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVariantPointerEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.GL_BYTE, stride, pAddr, pAddr.position());
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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVariantPointerEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, stride, pAddr, pAddr.position()<<1);
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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVariantPointerEXT(id, CoreGL11Constants.GL_FLOAT, stride, pAddr, pAddr.position()<<2);
nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position()<<2);
}
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVariantPointerEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.GL_INT, stride, pAddr, pAddr.position()<<2);
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) {

View File

@ -43,7 +43,7 @@ import java.nio.Buffer;
import java.nio.FloatBuffer;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class EXTVertexWeighting {
public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; /* alias to MODELVIEW_STACK_DEPTH */
@ -64,7 +64,7 @@ public class EXTVertexWeighting {
public static void glVertexWeightPointerEXT(int size, int stride, FloatBuffer pPointer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexWeightPointerEXT(size, CoreGL11Constants.GL_FLOAT, stride, pPointer, pPointer.position()<<2);
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) {

View File

@ -41,7 +41,7 @@ package org.lwjgl.opengl.nv;
import java.nio.*;
import org.lwjgl.opengl.VBOTracker;
import org.lwjgl.opengl.CoreGL11Constants;
import org.lwjgl.opengl.GL11;
public class NVVertexProgram extends NVProgram {
@ -260,22 +260,22 @@ public class NVVertexProgram extends NVProgram {
public static void glVertexAttribPointerNV(int index, int size, boolean unsigned, int stride, ByteBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerNV(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerNV(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.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) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerNV(index, size, CoreGL11Constants.GL_FLOAT, stride, buffer, buffer.position() << 2);
nglVertexAttribPointerNV(index, size, GL11.GL_FLOAT, stride, buffer, buffer.position() << 2);
}
public static void glVertexAttribPointerNV(int index, int size, boolean unsigned, int stride, IntBuffer buffer) {
assert VBOTracker.getVBOArrayStack().getState() == 0: "Cannot use Buffers when VBO is enabled";
nglVertexAttribPointerNV(index, size, unsigned ? CoreGL11Constants.GL_UNSIGNED_INT : CoreGL11Constants.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);

View File

@ -35,7 +35,7 @@ import org.lwjgl.Sys;
import org.lwjgl.Display;
import org.lwjgl.DisplayMode;
import org.lwjgl.input.Controller;
import org.lwjgl.opengl.CoreGL11;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.Window;
import org.lwjgl.opengl.GLU;
import org.lwjgl.vector.Vector2f;
@ -88,7 +88,7 @@ public class ControllerCreationTest {
}
private void initializeOpenGL() {
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GLU.gluOrtho2D(0.0, 640, 0, 480);
}
@ -195,24 +195,24 @@ public class ControllerCreationTest {
}
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glPushMatrix();
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
GL11.glPushMatrix();
GL11.glBegin(GL11.GL_POLYGON);
{
CoreGL11.glColor3f(0.0f, 1.0f, 1.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
GL11.glColor3f(0.0f, 1.0f, 1.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
CoreGL11.glColor3f(1.0f, 0.0f, 1.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
GL11.glColor3f(1.0f, 0.0f, 1.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
CoreGL11.glColor3f(1.0f, 1.0f, 0.0f);
CoreGL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
GL11.glColor3f(1.0f, 1.0f, 0.0f);
GL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
GL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
}
CoreGL11.glEnd();
CoreGL11.glPopMatrix();
GL11.glEnd();
GL11.glPopMatrix();
}
/**

View File

@ -34,7 +34,7 @@ package org.lwjgl.test.input;
import org.lwjgl.DisplayMode;
import org.lwjgl.input.Controller;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.CoreGL11;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.Window;
import org.lwjgl.opengl.GLU;
import org.lwjgl.vector.Vector2f;
@ -86,7 +86,7 @@ public class ControllerTest {
}
private void initializeOpenGL() {
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GLU.gluOrtho2D(0.0, 640, 0, 480);
}
@ -167,9 +167,9 @@ public class ControllerTest {
}
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
GL11.glBegin(GL11.GL_POLYGON);
{
float color = 1.0f;
int buttonDown = 0;
@ -180,15 +180,15 @@ public class ControllerTest {
System.out.println("Button " + i + " down");
}
}
CoreGL11.glColor3f(color, color, color);
GL11.glColor3f(color, color, color);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
GL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
}
CoreGL11.glEnd();
GL11.glEnd();
}
/**

View File

@ -182,23 +182,23 @@ public class HWCursorTest {
*/
private void render() {
//clear background
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
// draw white quad
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(mouse_x, 600 - mouse_y, 0);
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
CoreGL11.glBegin(CoreGL11.GL_QUADS);
GL11.glTranslatef(mouse_x, 600 - mouse_y, 0);
GL11.glColor3f(1.0f, 1.0f, 1.0f);
GL11.glBegin(GL11.GL_QUADS);
{
CoreGL11.glVertex2i(-50, -50);
CoreGL11.glVertex2i(50, -50);
CoreGL11.glVertex2i(50, 50);
CoreGL11.glVertex2i(-50, 50);
GL11.glVertex2i(-50, -50);
GL11.glVertex2i(50, -50);
GL11.glVertex2i(50, 50);
GL11.glVertex2i(-50, 50);
}
CoreGL11.glEnd();
GL11.glEnd();
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
/**
@ -327,15 +327,15 @@ public class HWCursorTest {
*/
private void glInit() {
// Go into orthographic projection mode.
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, mode.width, mode.height);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, mode.width, mode.height);
//set clear color to black
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
//sync frame (only works on windows)
Window.setVSyncEnabled(true);

View File

@ -33,7 +33,7 @@ package org.lwjgl.test.input;
import org.lwjgl.DisplayMode;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.CoreGL11;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.Window;
import org.lwjgl.opengl.GLU;
import org.lwjgl.vector.Vector2f;
@ -89,7 +89,7 @@ public class KeyboardTest {
}
private void initializeOpenGL() {
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GLU.gluOrtho2D(0.0, 640, 0, 480);
}
@ -198,21 +198,21 @@ public class KeyboardTest {
}
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
GL11.glBegin(GL11.GL_POLYGON);
{
float color = 1.0f;
int buttonDown = 0;
CoreGL11.glColor3f(color, color, color);
GL11.glColor3f(color, color, color);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
GL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
}
CoreGL11.glEnd();
GL11.glEnd();
}
/**

View File

@ -35,7 +35,7 @@ import org.lwjgl.Sys;
import org.lwjgl.Display;
import org.lwjgl.DisplayMode;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.CoreGL11;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.Window;
import org.lwjgl.opengl.GLU;
import org.lwjgl.vector.Vector2f;
@ -91,7 +91,7 @@ public class MouseCreationTest {
}
private void initializeOpenGL() {
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GLU.gluOrtho2D(0.0, 640, 0, 480);
}
@ -200,9 +200,9 @@ public class MouseCreationTest {
}
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
GL11.glBegin(GL11.GL_POLYGON);
{
float color = 1.0f;
int buttonDown = 0;
@ -213,15 +213,15 @@ public class MouseCreationTest {
break;
}
}
CoreGL11.glColor3f(color, color, color);
GL11.glColor3f(color, color, color);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
GL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
}
CoreGL11.glEnd();
GL11.glEnd();
}
/**

View File

@ -34,7 +34,7 @@ package org.lwjgl.test.input;
import org.lwjgl.DisplayMode;
import org.lwjgl.input.Mouse;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.CoreGL11;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.Window;
import org.lwjgl.opengl.GLU;
import org.lwjgl.vector.Vector2f;
@ -86,7 +86,7 @@ public class MouseTest {
}
private void initializeOpenGL() {
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GLU.gluOrtho2D(0.0, 640, 0, 480);
}
@ -154,9 +154,9 @@ public class MouseTest {
}
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
GL11.glBegin(GL11.GL_POLYGON);
{
float color = 1.0f;
int buttonDown = 0;
@ -167,15 +167,15 @@ public class MouseTest {
break;
}
}
CoreGL11.glColor3f(color, color, color);
GL11.glColor3f(color, color, color);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
CoreGL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
CoreGL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
GL11.glVertex2f(position.x + 0.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 40.0f, position.y + 30.0f);
GL11.glVertex2f(position.x + 60.0f, position.y + 15.f);
GL11.glVertex2f(position.x + 40.0f, position.y + 0.0f);
}
CoreGL11.glEnd();
GL11.glEnd();
}
/**

View File

@ -122,14 +122,14 @@ public class PositionTest extends BasicTest {
// =====================================================
Sys.log("Setting up OpenGL");
CoreGL11.glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluPerspective(50.0, WINDOW_WIDTH / WINDOW_HEIGHT, 0.0, 50.0);
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glTranslatef(0.0f, 0.0f, -6.6f);
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glTranslatef(0.0f, 0.0f, -6.6f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glut = this.new GLUT();
Window.setVSyncEnabled(true);
@ -404,48 +404,48 @@ public class PositionTest extends BasicTest {
* Render the scene
*/
private void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT | CoreGL11.GL_DEPTH_BUFFER_BIT);
CoreGL11.glPushMatrix();
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glPushMatrix();
{
CoreGL11.glRotatef(20.0f, 1.0f, 1.0f, 0.0f);
GL11.glRotatef(20.0f, 1.0f, 1.0f, 0.0f);
// left
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(leftPosition.get(0), leftPosition.get(1), leftPosition.get(2));
CoreGL11.glColor3f(1.0f, 0.0f, 0.0f);
GL11.glTranslatef(leftPosition.get(0), leftPosition.get(1), leftPosition.get(2));
GL11.glColor3f(1.0f, 0.0f, 0.0f);
glut.glutWireCube(0.5f);
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
// center
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(centerPosition.get(0), centerPosition.get(1), centerPosition.get(2));
CoreGL11.glColor3f(0.0f, 0.0f, 1.0f);
GL11.glTranslatef(centerPosition.get(0), centerPosition.get(1), centerPosition.get(2));
GL11.glColor3f(0.0f, 0.0f, 1.0f);
glut.glutWireCube(0.5f);
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
// right
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(rightPosition.get(0), rightPosition.get(1), rightPosition.get(2));
CoreGL11.glColor3f(0.0f, 1.0f, 0.0f);
GL11.glTranslatef(rightPosition.get(0), rightPosition.get(1), rightPosition.get(2));
GL11.glColor3f(0.0f, 1.0f, 0.0f);
glut.glutWireCube(0.5f);
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
// listener
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(listenerPosition.get(0), listenerPosition.get(1), listenerPosition.get(2));
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
GL11.glTranslatef(listenerPosition.get(0), listenerPosition.get(1), listenerPosition.get(2));
GL11.glColor3f(1.0f, 1.0f, 1.0f);
glut.glutSolidCube(0.5f);
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
/**
@ -515,11 +515,11 @@ public class PositionTest extends BasicTest {
float v[][] = new float[8][3];
public void glutWireCube(float size) {
drawBox(size, CoreGL11.GL_LINE_LOOP);
drawBox(size, GL11.GL_LINE_LOOP);
}
public void glutSolidCube(float size) {
drawBox(size, CoreGL11.GL_QUADS);
drawBox(size, GL11.GL_QUADS);
}
private void drawBox(float size, int type) {
@ -532,13 +532,13 @@ public class PositionTest extends BasicTest {
v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2;
for (int i = 5; i >= 0; i--) {
CoreGL11.glBegin(type);
CoreGL11.glNormal3f(n[i][0], n[i][1], n[i][2]);
CoreGL11.glVertex3f(v[faces[i][0]][0], v[faces[i][0]][1], v[faces[i][0]][2]);
CoreGL11.glVertex3f(v[faces[i][1]][0], v[faces[i][1]][1], v[faces[i][1]][2]);
CoreGL11.glVertex3f(v[faces[i][2]][0], v[faces[i][2]][1], v[faces[i][2]][2]);
CoreGL11.glVertex3f(v[faces[i][3]][0], v[faces[i][3]][1], v[faces[i][3]][2]);
CoreGL11.glEnd();
GL11.glBegin(type);
GL11.glNormal3f(n[i][0], n[i][1], n[i][2]);
GL11.glVertex3f(v[faces[i][0]][0], v[faces[i][0]][1], v[faces[i][0]][2]);
GL11.glVertex3f(v[faces[i][1]][0], v[faces[i][1]][1], v[faces[i][1]][2]);
GL11.glVertex3f(v[faces[i][2]][0], v[faces[i][2]][1], v[faces[i][2]][2]);
GL11.glVertex3f(v[faces[i][3]][0], v[faces[i][3]][1], v[faces[i][3]][2]);
GL11.glEnd();
}
}

View File

@ -168,24 +168,24 @@ public class FullScreenWindowedTest {
private void render() {
//clear background
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
// draw white quad
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
CoreGL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
CoreGL11.glBegin(CoreGL11.GL_QUADS);
GL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
GL11.glColor3f(1.0f, 1.0f, 1.0f);
GL11.glBegin(GL11.GL_QUADS);
{
CoreGL11.glVertex2i(-50, -50);
CoreGL11.glVertex2i(50, -50);
CoreGL11.glVertex2i(50, 50);
CoreGL11.glVertex2i(-50, 50);
GL11.glVertex2i(-50, -50);
GL11.glVertex2i(50, -50);
GL11.glVertex2i(50, 50);
GL11.glVertex2i(-50, 50);
}
CoreGL11.glEnd();
GL11.glEnd();
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
/**
@ -305,15 +305,15 @@ public class FullScreenWindowedTest {
*/
private void glInit() {
// Go into orthographic projection mode.
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, mode.width, mode.height);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, mode.width, mode.height);
//set clear color to black
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
//sync frame (only works on windows)
Window.setVSyncEnabled(true);

View File

@ -148,17 +148,17 @@ public final class Game {
* All rendering is done in here
*/
private static void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glPushMatrix();
CoreGL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
CoreGL11.glRotatef(angle, 0, 0, 1.0f);
CoreGL11.glBegin(CoreGL11.GL_QUADS);
CoreGL11.glVertex2i(-50, -50);
CoreGL11.glVertex2i(50, -50);
CoreGL11.glVertex2i(50, 50);
CoreGL11.glVertex2i(-50, 50);
CoreGL11.glEnd();
CoreGL11.glPopMatrix();
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
GL11.glPushMatrix();
GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
GL11.glRotatef(angle, 0, 0, 1.0f);
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex2i(-50, -50);
GL11.glVertex2i(50, -50);
GL11.glVertex2i(50, 50);
GL11.glVertex2i(-50, 50);
GL11.glEnd();
GL11.glPopMatrix();
}
/**
@ -172,18 +172,18 @@ public final class Game {
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
System.out.println("Timer resolution: " + Sys.getTimerResolution());
// Go into orthographic projection mode.
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
ByteBuffer num_tex_units_buf = ByteBuffer.allocateDirect(4);
num_tex_units_buf.order(ByteOrder.nativeOrder());
CoreGL11.glGetInteger(CoreGL13.GL_MAX_TEXTURE_UNITS, num_tex_units_buf.asIntBuffer());
GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS, num_tex_units_buf.asIntBuffer());
System.out.println("Number of texture units: " + num_tex_units_buf.getInt());
// Fix the refresh rate to the display frequency.
// CoreGL11.wglSwapIntervalEXT(1);
// GL11.wglSwapIntervalEXT(1);
}
/**

View File

@ -147,7 +147,7 @@ public class Grass {
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
program_handle,
program_buf);
/*CoreGL11.glGetInteger(CoreGL11.PROGRAM_ERROR_POSITION_NV, int_buf);
/*GL11.glGetInteger(GL11.PROGRAM_ERROR_POSITION_NV, int_buf);
System.out.println("error position: " + int_buf.get(0));*/
genMesh();
@ -160,24 +160,24 @@ public class Grass {
light_buf_f.rewind();
light_buf_f.put(LightDiffuse);
CoreGL11.glLightfv(
CoreGL11.GL_LIGHT0,
CoreGL11.GL_DIFFUSE,
GL11.glLightfv(
GL11.GL_LIGHT0,
GL11.GL_DIFFUSE,
light_buf_f);
light_buf_f.rewind();
light_buf_f.put(LightPosition);
CoreGL11.glLightfv(
CoreGL11.GL_LIGHT0,
CoreGL11.GL_POSITION,
GL11.glLightfv(
GL11.GL_LIGHT0,
GL11.GL_POSITION,
light_buf_f);
CoreGL11.glEnable(CoreGL11.GL_LIGHT0);
CoreGL11.glEnable(CoreGL11.GL_LIGHTING);
CoreGL11.glEnable(CoreGL11.GL_DEPTH_TEST);
CoreGL11.glBlendFunc(CoreGL11.GL_SRC_ALPHA, CoreGL11.GL_ONE_MINUS_SRC_ALPHA);
CoreGL11.glEnable(CoreGL11.GL_BLEND);
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
GL11.glEnable(GL11.GL_LIGHT0);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GLU.gluPerspective(40.0, 1.0, 1.0, 50.0);
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GLU.gluLookAt(14.0, 10.0, -16.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
@ -193,7 +193,7 @@ public class Grass {
degree *= (0.5 + myrand());
ptrAnimate(degree);
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT | CoreGL11.GL_DEPTH_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
//ptrDraw();
@ -239,16 +239,16 @@ public class Grass {
fRigid = ((fRigid = myrand()) < 0.2f) ? 0.2f : fRigid;
if (myrand() < 0.3)
CoreGL11.glBegin(CoreGL11.GL_LINE_STRIP);
GL11.glBegin(GL11.GL_LINE_STRIP);
else
CoreGL11.glBegin(CoreGL11.GL_QUAD_STRIP);
GL11.glBegin(GL11.GL_QUAD_STRIP);
for (cFaces = 0; cFaces < numFaces; cFaces++) {
for (cWidth = frndWidth;
cWidth >= -frndWidth;
cWidth -= (frndWidth * 2.0f)) {
CoreGL11.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces);
CoreGL11.glVertex3f(
GL11.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces);
GL11.glVertex3f(
(float) (((cFaces - 2) * 0.1f)
* java.lang.Math.cos(fRotate)
+ (cWidth) * java.lang.Math.sin(fRotate)),
@ -259,7 +259,7 @@ public class Grass {
}
frndWidth -= fDecWidth;
}
CoreGL11.glEnd();
GL11.glEnd();
}
@ -267,18 +267,18 @@ public class Grass {
float cI, cJ, fArea;
fArea = 20.0f;
mesh = CoreGL11.glGenLists(1);
CoreGL11.glNewList(mesh, CoreGL11.GL_COMPILE);
mesh = GL11.glGenLists(1);
GL11.glNewList(mesh, GL11.GL_COMPILE);
for (cI = -fArea / 2; cI < fArea / 2; cI += 0.25f) {
for (cJ = -fArea / 2; cJ < fArea / 2; cJ += 0.25f) {
genGrass(0.5f, 0.1f, cI, cJ);
}
}
CoreGL11.glEndList();
GL11.glEndList();
}
private static void grsDraw() {
CoreGL11.glEnable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
GL11.glEnable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
NVVertexProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle);
NVVertexProgram.glTrackMatrixNV(
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
@ -426,8 +426,8 @@ public class Grass {
0.5f,
1f);
NVVertexProgram.glProgramParameter4fNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, 26, 0.7f, 0.4f, 0f, 0f);
CoreGL11.glCallList(mesh);
CoreGL11.glDisable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
GL11.glCallList(mesh);
GL11.glDisable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
}

View File

@ -184,49 +184,49 @@ public class PbufferTest {
pbuffer.makeCurrent();
// Pbuffer rendering
//clear background
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
// draw white quad
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
CoreGL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
CoreGL11.glBegin(CoreGL11.GL_QUADS);
GL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
GL11.glColor3f(1.0f, 1.0f, 1.0f);
GL11.glBegin(GL11.GL_QUADS);
{
CoreGL11.glVertex2i(-50, -50);
CoreGL11.glVertex2i(50, -50);
CoreGL11.glVertex2i(50, 50);
CoreGL11.glVertex2i(-50, 50);
GL11.glVertex2i(-50, -50);
GL11.glVertex2i(50, -50);
GL11.glVertex2i(50, 50);
GL11.glVertex2i(-50, 50);
}
CoreGL11.glEnd();
GL11.glEnd();
}
CoreGL11.glPopMatrix();
CoreGL11.glCopyTexImage2D(CoreGL11.GL_TEXTURE_2D, 0, CoreGL11.GL_RGB, 0, 0, 512, 512, 0);
GL11.glPopMatrix();
GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, 0, 0, 512, 512, 0);
Pbuffer.releaseContext();
// OpenGL window rendering
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
// draw white quad
CoreGL11.glPushMatrix();
GL11.glPushMatrix();
{
CoreGL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
CoreGL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
CoreGL11.glColor3f(1.0f, 1.0f, 0.0f);
CoreGL11.glBegin(CoreGL11.GL_QUADS);
GL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
GL11.glColor3f(1.0f, 1.0f, 0.0f);
GL11.glBegin(GL11.GL_QUADS);
{
CoreGL11.glTexCoord2f(0f, 0f);
CoreGL11.glVertex2i(-50, -50);
CoreGL11.glTexCoord2f(1f, 0f);
CoreGL11.glVertex2i(50, -50);
CoreGL11.glTexCoord2f(1f, 1f);
CoreGL11.glVertex2i(50, 50);
CoreGL11.glTexCoord2f(0f, 1f);
CoreGL11.glVertex2i(-50, 50);
GL11.glTexCoord2f(0f, 0f);
GL11.glVertex2i(-50, -50);
GL11.glTexCoord2f(1f, 0f);
GL11.glVertex2i(50, -50);
GL11.glTexCoord2f(1f, 1f);
GL11.glVertex2i(50, 50);
GL11.glTexCoord2f(0f, 1f);
GL11.glVertex2i(-50, 50);
}
CoreGL11.glEnd();
GL11.glEnd();
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
private void initPbuffer() {
@ -234,7 +234,7 @@ public class PbufferTest {
pbuffer = new Pbuffer(512, 512, mode.bpp, 0, 0, 0);
pbuffer.makeCurrent();
initGLState(256, 256, 0.5f);
CoreGL11.glBindTexture(CoreGL11.GL_TEXTURE_2D, tex_handle);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, tex_handle);
Pbuffer.releaseContext();
} catch (Exception e) {
e.printStackTrace();
@ -335,7 +335,7 @@ public class PbufferTest {
private void destroyTexture() {
IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
buffer.put(0, tex_handle);
CoreGL11.glDeleteTextures(buffer);
GL11.glDeleteTextures(buffer);
}
/**
@ -370,15 +370,15 @@ public class PbufferTest {
}
private void initGLState(int width, int height, float color) {
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, width, height);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, width, height);
//set clear color to black
CoreGL11.glClearColor(color, color, color, 0.0f);
GL11.glClearColor(color, color, color, 0.0f);
}
/**
@ -388,17 +388,17 @@ public class PbufferTest {
//sync frame (only works on windows)
Window.setVSyncEnabled(true);
CoreGL11.glTexEnvf(CoreGL11.GL_TEXTURE_ENV, CoreGL11.GL_TEXTURE_ENV_MODE, CoreGL11.GL_REPLACE);
CoreGL11.glEnable(CoreGL11.GL_TEXTURE_2D);
GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_REPLACE);
GL11.glEnable(GL11.GL_TEXTURE_2D);
// Create shared texture
IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
CoreGL11.glGenTextures(buffer);
GL11.glGenTextures(buffer);
tex_handle = buffer.get(0);
CoreGL11.glBindTexture(CoreGL11.GL_TEXTURE_2D, tex_handle);
CoreGL11.glTexParameteri(CoreGL11.GL_TEXTURE_2D, CoreGL11.GL_TEXTURE_WRAP_S, CoreGL11.GL_CLAMP);
CoreGL11.glTexParameteri(CoreGL11.GL_TEXTURE_2D, CoreGL11.GL_TEXTURE_WRAP_T, CoreGL11.GL_CLAMP);
CoreGL11.glTexParameteri(CoreGL11.GL_TEXTURE_2D, CoreGL11.GL_TEXTURE_MIN_FILTER, CoreGL11.GL_LINEAR);
CoreGL11.glTexParameteri(CoreGL11.GL_TEXTURE_2D, CoreGL11.GL_TEXTURE_MAG_FILTER, CoreGL11.GL_LINEAR);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, tex_handle);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
initGLState(mode.width, mode.height, 0f);
}

View File

@ -151,10 +151,10 @@ public final class VBOIndexTest {
* All rendering is done in here
*/
private static void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glPushMatrix();
CoreGL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
CoreGL11.glRotatef(angle, 0, 0, 1.0f);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
GL11.glPushMatrix();
GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
GL11.glRotatef(angle, 0, 0, 1.0f);
ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer);
@ -175,9 +175,9 @@ public final class VBOIndexTest {
mapped_indices_int_buffer.put(indices);
if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) &&
ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB)) {
CoreGL11.glDrawElements(CoreGL11.GL_QUADS, 4, CoreGL11.GL_UNSIGNED_INT, 0);
GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0);
}
CoreGL11.glPopMatrix();
GL11.glPopMatrix();
}
/**
@ -191,12 +191,12 @@ public final class VBOIndexTest {
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
System.out.println("Timer resolution: " + Sys.getTimerResolution());
// Go into orthographic projection mode.
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
if (!GLCaps.GL_ARB_vertex_buffer_object) {
System.out.println("ARB VBO not supported!");
System.exit(1);
@ -215,8 +215,8 @@ public final class VBOIndexTest {
indices.rewind();
ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB);
ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, 4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB);
CoreGL11.glEnableClientState(CoreGL11.GL_VERTEX_ARRAY);
CoreGL11.glVertexPointer(2, CoreGL11.GL_FLOAT, 0, 0);
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0);
}
/**

View File

@ -147,10 +147,10 @@ public final class VBOTest {
* All rendering is done in here
*/
private static void render() {
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
CoreGL11.glPushMatrix();
CoreGL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
CoreGL11.glRotatef(angle, 0, 0, 1.0f);
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
GL11.glPushMatrix();
GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
GL11.glRotatef(angle, 0, 0, 1.0f);
ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer);
if (new_mapped_buffer != mapped_buffer)
mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer();
@ -159,8 +159,8 @@ public final class VBOTest {
vertices.rewind();
mapped_float_buffer.put(vertices);
if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB))
CoreGL11.glDrawArrays(CoreGL11.GL_QUADS, 0, 4);
CoreGL11.glPopMatrix();
GL11.glDrawArrays(GL11.GL_QUADS, 0, 4);
GL11.glPopMatrix();
}
/**
@ -174,12 +174,12 @@ public final class VBOTest {
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
System.out.println("Timer resolution: " + Sys.getTimerResolution());
// Go into orthographic projection mode.
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
CoreGL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
CoreGL11.glLoadIdentity();
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glLoadIdentity();
GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
if (!GLCaps.GL_ARB_vertex_buffer_object) {
System.out.println("ARB VBO not supported!");
System.exit(1);
@ -191,8 +191,8 @@ public final class VBOTest {
vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50);
ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB);
CoreGL11.glEnableClientState(CoreGL11.GL_VERTEX_ARRAY);
CoreGL11.glVertexPointer(2, CoreGL11.GL_FLOAT, 0, 0);
GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0);
}
/**

View File

@ -34,14 +34,13 @@ COMMON = \
org_lwjgl_openal_eax_EAXBufferProperties.h \
org_lwjgl_openal_eax_EAXListenerProperties.cpp \
org_lwjgl_openal_eax_EAXListenerProperties.h \
org_lwjgl_opengl_CoreGL11.cpp \
org_lwjgl_opengl_CoreGL11.h \
org_lwjgl_opengl_CoreGL12.cpp \
org_lwjgl_opengl_CoreGL12.h \
org_lwjgl_opengl_CoreGL13.cpp \
org_lwjgl_opengl_CoreGL13.h \
org_lwjgl_opengl_CoreGL14.cpp \
org_lwjgl_opengl_CoreGL15.h \
org_lwjgl_opengl_GL11.cpp \
org_lwjgl_opengl_GL11.h \
org_lwjgl_opengl_GL12.cpp \
org_lwjgl_opengl_GL12.h \
org_lwjgl_opengl_GL13.cpp \
org_lwjgl_opengl_GL13.h \
org_lwjgl_opengl_GL14.cpp \
org_lwjgl_opengl_GLU.cpp \
org_lwjgl_opengl_GLU.h

View File

@ -8,10 +8,10 @@
extern "C" {
#endif
/* Inaccessible static: created */
/* Inaccessible static: class_000240 */
/* Inaccessible static: class_000241 */
/* Inaccessible static: class_00024org_00024lwjgl_00024openal_00024BaseAL */
/* Inaccessible static: class_00024java_00024lang_00024String */
/* Inaccessible static: _00024assertionsDisabled */
/* Inaccessible static: class_000240 */
/* Inaccessible static: class_00024org_00024lwjgl_00024openal_00024CoreAL */
/*
* Class: org_lwjgl_openal_CoreAL
* Method: alEnable

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,586 @@
/*
* Copyright (c) 2002 Light Weight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* $Id$
*
* Core OpenGL functions.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
#ifdef _WIN32
#include <windows.h>
#endif
#include "org_lwjgl_opengl_GL12.h"
#include "checkGLerror.h"
#include "extgl.h"
/*
* Class: org_lwjgl_opengl_GL12
* Method: glColorTable
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglColorTable
(JNIEnv * env, jclass clazz, jint target, jint internalFormat, jint width, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glColorTable)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glColorTable(target, internalFormat, width, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glColorSubTable
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglColorSubTable
(JNIEnv * env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glColorSubTable)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glColorSubTable(target, start, count, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetColorTable
* Signature: (IIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetColorTable
(JNIEnv * env, jclass clazz, jint target, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetColorTable)
void *address = (void *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glGetColorTable(target, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetColorTableParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetColorTableParameteriv
(JNIEnv * env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetColorTableParameteriv)
GLint *address = offset + (GLint *)env->GetDirectBufferAddress(buffer);
glGetColorTableParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetColorTableParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetColorTableParameterfv
(JNIEnv * env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetColorTableParameterfv)
GLfloat *address = offset + (GLfloat *)env->GetDirectBufferAddress(buffer);
glGetColorTableParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glColorTableParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglColorTableParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glColorTableParameteriv)
const GLint *address = offset + (const GLint *)env->GetDirectBufferAddress(buffer);
glColorTableParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glColorTableParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglColorTableParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glColorTableParameterfv)
const GLfloat *address = offset + (const GLfloat *)env->GetDirectBufferAddress(buffer);
glColorTableParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glCopyColorSubTable
* Signature: (IIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glCopyColorSubTable
(JNIEnv *env, jclass clazz, jint target, jint start, jint x, jint y, jint width)
{
CHECK_EXISTS(glCopyColorSubTable)
glCopyColorSubTable(target, start, x, y, width);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glCopyColorTable
* Signature: (IIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glCopyColorTable
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width)
{
CHECK_EXISTS(glCopyColorTable)
glCopyColorTable(target, internalformat, x, y, width);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glBlendEquation
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glBlendEquation
(JNIEnv *env, jclass clazz, jint mode)
{
CHECK_EXISTS(glBlendEquation)
glBlendEquation(mode);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glBlendColor
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glBlendColor(JNIEnv * env, jclass clazz, jfloat p0, jfloat p1, jfloat p2, jfloat p3)
{
CHECK_EXISTS(glBlendColor)
glBlendColor((GLfloat) p0, (GLfloat) p1, (GLfloat) p2, (GLfloat) p3);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glHistogram
* Signature: (IIIZ)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glHistogram
(JNIEnv *env, jclass clazz, jint target, jint width, jint internalformat, jboolean sink)
{
CHECK_EXISTS(glHistogram)
glHistogram(target, width, internalformat, sink);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glResetHistogram
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glResetHistogram
(JNIEnv *env, jclass clazz, jint target)
{
CHECK_EXISTS(glResetHistogram)
glResetHistogram(target);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetHistogram
* Signature: (IZIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetHistogram
(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetHistogram)
void *address = (void *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glGetHistogram(target, reset, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetHistogramParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetHistogramParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetHistogramParameterfv)
GLfloat *address = offset + (GLfloat *)env->GetDirectBufferAddress(buffer);
glGetHistogramParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetHistogramParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetHistogramParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetHistogramParameteriv)
GLint *address = offset + (GLint *)env->GetDirectBufferAddress(buffer);
glGetHistogramParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glMinmax
* Signature: (IIZ)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glMinmax
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jboolean sink)
{
CHECK_EXISTS(glMinmax)
glMinmax(target, internalformat, sink);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glResetMinmax
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glResetMinmax
(JNIEnv *env, jclass clazz, jint target)
{
CHECK_EXISTS(glResetMinmax)
glResetMinmax(target);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetMinmax
* Signature: (IZIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetMinmax
(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetMinmax)
void *address = (void *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glGetMinmax(target, reset, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetMinmaxParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetMinmaxParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetMinmaxParameterfv)
GLfloat *address = offset + (GLfloat *)env->GetDirectBufferAddress(buffer);
glGetMinmaxParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetMinmaxParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetMinmaxParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetMinmaxParameteriv)
GLint *address = offset + (GLint *)env->GetDirectBufferAddress(buffer);
glGetMinmaxParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionFilter1D
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglConvolutionFilter1D
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glConvolutionFilter1D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glConvolutionFilter1D(target, internalformat, width, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionFilter2D
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglConvolutionFilter2D
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glConvolutionFilter2D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glConvolutionFilter2D(target, internalformat, width, height, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionParameterf
* Signature: (IIF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glConvolutionParameterf
(JNIEnv *env, jclass clazz, jint target, jint pname, jfloat params)
{
CHECK_EXISTS(glConvolutionParameterf)
glConvolutionParameterf(target, pname, params);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglConvolutionParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glConvolutionParameterfv)
const GLfloat *address = offset + (const GLfloat *)env->GetDirectBufferAddress(buffer);
glConvolutionParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionParameteri
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glConvolutionParameteri
(JNIEnv *env, jclass clazz, jint target, jint pname, jint params)
{
CHECK_EXISTS(glConvolutionParameteri)
glConvolutionParameteri(target, pname, params);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glConvolutionParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglConvolutionParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glConvolutionParameteriv)
const GLint *address = offset + (const GLint *)env->GetDirectBufferAddress(buffer);
glConvolutionParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glCopyConvolutionFilter1D
* Signature: (IIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glCopyConvolutionFilter1D
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width)
{
CHECK_EXISTS(glCopyConvolutionFilter1D)
glCopyConvolutionFilter1D(target, internalformat, x, y, width);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glCopyConvolutionFilter2D
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glCopyConvolutionFilter2D
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jint height)
{
CHECK_EXISTS(glCopyConvolutionFilter2D)
glCopyConvolutionFilter2D(target, internalformat, x, y, width, height);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetConvolutionFilter
* Signature: (IIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetConvolutionFilter
(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetConvolutionFilter)
void *address = (void *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glGetConvolutionFilter(target, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetConvolutionParameterfv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetConvolutionParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetConvolutionParameterfv)
GLfloat *address = offset + (GLfloat *)env->GetDirectBufferAddress(buffer);
glGetConvolutionParameterfv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetConvolutionParameteriv
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetConvolutionParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetConvolutionParameteriv)
GLint *address = offset + (GLint *)env->GetDirectBufferAddress(buffer);
glGetConvolutionParameteriv(target, pname, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glSeparableFilter2D
* Signature: (IIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglSeparableFilter2D
(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jobject row, jint row_offset, jobject column, jint column_offset)
{
CHECK_EXISTS(glSeparableFilter2D)
const void *address = (const void *)(row_offset + (const GLbyte *)env->GetDirectBufferAddress(row));
const void *address2 = (const void *)(column_offset + (const GLbyte *)env->GetDirectBufferAddress(column));
glSeparableFilter2D(target, internalformat, width, height, format, type, address, address2);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glGetSeparableFilter
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglGetSeparableFilter
(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jobject row, jint row_offset, jobject column, jint column_offset, jobject span, jint span_offset)
{
CHECK_EXISTS(glGetSeparableFilter)
void *address = (void *)(row_offset + (GLbyte *)env->GetDirectBufferAddress(row));
void *address2 = (void *)(column_offset + (GLbyte *)env->GetDirectBufferAddress(column));
void *address3 = (void *)(span_offset + (GLbyte *)env->GetDirectBufferAddress(span));
glGetSeparableFilter(target, format, type, address, address2, address3);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: nglDrawRangeElements
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglDrawRangeElements
(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glDrawRangeElements)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glDrawRangeElements(mode, start, end, count, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: nglDrawRangeElementsVBO
* Signature: (IIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglDrawRangeElementsVBO
(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jint buffer_offset)
{
CHECK_EXISTS(glDrawRangeElements)
glDrawRangeElements(mode, start, end, count, type, offsetToPointer(buffer_offset));
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glTexImage3D
* Signature: (IIIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glTexImage3D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glTexSubImage3D
* Signature: (IIIIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexSubImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject buffer, jint offset)
{
CHECK_EXISTS(glTexSubImage3D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL12
* Method: glCopyTexSubImage3D
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_glCopyTexSubImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height)
{
CHECK_EXISTS(glCopyTexSubImage3D)
glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
CHECK_GL_ERROR
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,274 @@
/*
* Copyright (c) 2002 Light Weight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* $Id$
*
* Core OpenGL functions.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
#ifdef _WIN32
#include <windows.h>
#endif
#include "org_lwjgl_opengl_GL13.h"
#include "checkGLerror.h"
#include "extgl.h"
/*
* Class: org_lwjgl_opengl_GL13
* Method: glActiveTexture
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glActiveTexture
(JNIEnv *env, jclass clazz, jint texture)
{
CHECK_EXISTS(glActiveTexture)
glActiveTexture(texture);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glClientActiveTexture
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glClientActiveTexture
(JNIEnv *env, jclass clazz, jint texture)
{
CHECK_EXISTS(glClientActiveTexture)
glClientActiveTexture(texture);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexImage1D
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1D
(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexImage1D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexImage1D(target, level, internalformat, width, border, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexImage2D
* Signature: (IIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2D
(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexImage2D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexImage2D(target, level, internalformat, width, height, border, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexImage3D
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexImage3D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexSubImage1D
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1D
(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexSubImage1D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexSubImage1D(target, level, xoffset, width, format, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexSubImage2D
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2D
(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexSubImage2D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glCompressedTexSubImage3D
* Signature: (IIIIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imagesize, jobject buffer, jint offset)
{
CHECK_EXISTS(glCompressedTexSubImage3D)
const void *address = (const void *)(offset + (const GLbyte *)env->GetDirectBufferAddress(buffer));
glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glGetCompressedTexImage
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImage
(JNIEnv *env, jclass clazz, jint target, jint lod, jobject buffer, jint offset)
{
CHECK_EXISTS(glGetCompressedTexImage)
void *address = (void *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glGetCompressedTexImage(target, lod, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glMultiTexCoord1f
* Signature: (IF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord1f
(JNIEnv *env, jclass clazz, jint target, jfloat s)
{
CHECK_EXISTS(glMultiTexCoord1f)
glMultiTexCoord1f(target, s);
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glMultiTexCoord2f
* Signature: (IFF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord2f
(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t)
{
CHECK_EXISTS(glMultiTexCoord2f)
glMultiTexCoord2f(target, s, t);
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glMultiTexCoord3f
* Signature: (IFFF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord3f
(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r)
{
CHECK_EXISTS(glMultiTexCoord3f)
glMultiTexCoord3f(target, s, t, r);
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glMultiTexCoord4f
* Signature: (IFFFF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord4f
(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jfloat q)
{
CHECK_EXISTS(glMultiTexCoord4f)
glMultiTexCoord4f(target, s, t, r, q);
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glLoadTransposeMatrixf
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglLoadTransposeMatrixf
(JNIEnv *env, jclass clazz, jobject buffer, jint offset)
{
CHECK_EXISTS(glLoadTransposeMatrixf)
const GLfloat *address = (const GLfloat *)env->GetDirectBufferAddress(buffer);
glLoadTransposeMatrixf(address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glMultTransposeMatrixf
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultTransposeMatrixf
(JNIEnv *env, jclass clazz, jobject buffer, jint offset)
{
CHECK_EXISTS(glMultTransposeMatrixf)
const GLfloat *address = (const GLfloat *)env->GetDirectBufferAddress(buffer);
glMultTransposeMatrixf(address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL13
* Method: glSampleCoverage
* Signature: (FZ)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glSampleCoverage
(JNIEnv *env, jclass clazz, jfloat value, jboolean invert)
{
CHECK_EXISTS(glSampleCoverage)
glSampleCoverage(value, invert);
CHECK_GL_ERROR
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,258 @@
/*
* Copyright (c) 2002 Light Weight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* $Id$
*
* Core OpenGL functions.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
#ifdef _WIN32
#include <windows.h>
#endif
#include "org_lwjgl_opengl_GL14.h"
#include "checkGLerror.h"
#include "extgl.h"
/*
* Class: org_lwjgl_opengl_GL14
* Method: glFogCoordf
* Signature: (F)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glFogCoordf
(JNIEnv *env, jclass clazz, jfloat f) {
CHECK_EXISTS(glFogCoordf)
glFogCoordf(f);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: nglFogCoordPointer
* Signature: (IILjava/nio/Buffer;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordPointer
(JNIEnv *env, jclass clazz, jint p1, jint p2, jobject buffer, jint offset) {
CHECK_EXISTS(glFogCoordPointer)
GLvoid *address = (GLvoid *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glFogCoordPointer(p1, p2, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: nglFogCoordPointerVBO
* Signature: (IILjava/nio/Buffer;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordPointerVBO
(JNIEnv *env, jclass clazz, jint p1, jint p2, jint buffer_offset) {
CHECK_EXISTS(glFogCoordPointer)
glFogCoordPointer(p1, p2, offsetToPointer(buffer_offset));
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glMultiDrawArrays
* Signature: (IIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglMultiDrawArrays
(JNIEnv *env, jclass clazz, jint mode, jobject first, jint first_offset, jobject count, jint count_offset, jint primcount) {
CHECK_EXISTS(glMultiDrawArrays)
GLint *address = first_offset + (GLint *)env->GetDirectBufferAddress(first);
GLsizei *address2 = count_offset + (GLsizei *)env->GetDirectBufferAddress(count);
glMultiDrawArrays(mode, address, address2, (GLsizei)primcount);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glMultiDrawElements
* Signature: (IIIII)V
*/
/*JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glMultiDrawElements
(JNIEnv *env, jclass clazz, jint mode, jobject count, jint type, jobject indices, jint primcount) {
CHECK_EXISTS(glMultiDrawElements)
const GLsizei *address = (const GLsizei *)env->GetDirectBufferAddress(count);
const void *address2 = (const void *)env->GetDirectBufferAddress(indices);
glMultiDrawElements(mode, address, type, address2, primcount);
CHECK_GL_ERROR
}
*/
/*
* Class: org_lwjgl_opengl_GL14
* Method: glPointParameterf
* Signature: (IF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glPointParameterf
(JNIEnv *env, jclass clazz, jint p1, jfloat p2) {
CHECK_EXISTS(glPointParameterf)
glPointParameterf(p1, p2);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glPointParameterfv
* Signature: (ILjava/nio/FloatBuffer;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglPointParameterfv
(JNIEnv *env, jclass clazz, jint p1, jobject buffer, jint offset) {
CHECK_EXISTS(glPointParameterfv)
GLfloat *address = offset + (GLfloat *)env->GetDirectBufferAddress(buffer);
glPointParameterfv(p1, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glSecondaryColor3b
* Signature: (BBB)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3b
(JNIEnv *env, jclass clazz, jbyte p1, jbyte p2, jbyte p3) {
CHECK_EXISTS(glSecondaryColor3b)
glSecondaryColor3b(p1, p2, p3);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glSecondaryColor3f
* Signature: (FFF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3f
(JNIEnv *env, jclass clazz, jfloat p1, jfloat p2, jfloat p3) {
CHECK_EXISTS(glSecondaryColor3f)
glSecondaryColor3f(p1, p2, p3);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glSecondaryColor3ub
* Signature: (BBB)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3ub
(JNIEnv *env, jclass clazz, jbyte p1, jbyte p2, jbyte p3) {
CHECK_EXISTS(glSecondaryColor3ub)
glSecondaryColor3ub(p1, p2, p3);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: nglSecondaryColorPointer
* Signature: (IIILjava/nio/Buffer;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColorPointer
(JNIEnv *env, jclass clazz, jint p1, jint p2, jint p3, jobject buffer, jint offset) {
CHECK_EXISTS(glSecondaryColorPointer)
const GLvoid *address = (const GLvoid *)(offset + (GLbyte *)env->GetDirectBufferAddress(buffer));
glSecondaryColorPointer(p1, p2, p3, address);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: nglSecondaryColorPointerVBO
* Signature: (IIILjava/nio/Buffer;)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColorPointerVBO
(JNIEnv *env, jclass clazz, jint p1, jint p2, jint p3, jint buffer_offset) {
CHECK_EXISTS(glSecondaryColorPointer)
glSecondaryColorPointer(p1, p2, p3, offsetToPointer(buffer_offset));
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glBlendFuncSeparate
* Signature: (IIII)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glBlendFuncSeparate
(JNIEnv *env, jclass clazz, jint p1, jint p2, jint p3, jint p4) {
CHECK_EXISTS(glBlendFuncSeparate)
glBlendFuncSeparate(p1, p2, p3, p4);
CHECK_GL_ERROR
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glWindowPos2f
* Signature: (FF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2f
(JNIEnv *env, jclass clazz, jfloat p1, jfloat p2) {
CHECK_EXISTS(glWindowPos2f);
glWindowPos2f(p1, p2);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glWindowPos2i
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2i
(JNIEnv *env, jclass clazz, jint p1, jint p2) {
CHECK_EXISTS(glWindowPos2i)
glWindowPos2i(p1, p2);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glWindowPos3f
* Signature: (FFF)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3f
(JNIEnv *env, jclass clazz, jfloat p1, jfloat p2, jfloat p3) {
CHECK_EXISTS(glWindowPos3f)
glWindowPos3f(p1, p2, p3);
}
/*
* Class: org_lwjgl_opengl_GL14
* Method: glWindowPos3i
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3i
(JNIEnv *env, jclass clazz, jint p1, jint p2, jint p3) {
CHECK_EXISTS(glWindowPos3i)
glWindowPos3i(p1, p2, p3);
}

File diff suppressed because it is too large Load Diff