Split extgl functions into separate cpp files. Added some extensions

This commit is contained in:
Elias Naur 2004-01-29 22:08:59 +00:00
parent f874cd8fc3
commit 4510847487
51 changed files with 3013 additions and 4434 deletions

View file

@ -129,6 +129,7 @@ public abstract class GLCaps {
public static boolean GL_NV_texture_shader3;
public static boolean GL_NV_vertex_array_range;
public static boolean GL_NV_vertex_array_range2;
public static boolean GL_NV_texture_compression_vtc;
public static boolean GL_NV_vertex_program;
public static boolean GL_NV_vertex_program1_1;
public static boolean GL_NV_vertex_program2;

View file

@ -114,176 +114,6 @@ public class ARBVertexProgram extends ARBProgram {
public static native void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w);
// ---------------------------
public static void glVertexAttrib1ARB(int index, ShortBuffer values) {
nglVertexAttrib1svARB(index, values, values.position());
}
private static native void nglVertexAttrib1svARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib1ARB(int index, FloatBuffer values) {
nglVertexAttrib1fvARB(index, values, values.position());
}
private static native void nglVertexAttrib1fvARB(int index, FloatBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib2ARB(int index, ShortBuffer values) {
assert values.remaining() >= 2: "<values> must have 2 shorts available.";
nglVertexAttrib2svARB(index, values, values.position());
}
private static native void nglVertexAttrib2svARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib2ARB(int index, FloatBuffer values) {
assert values.remaining() >= 2: "<values> must have 2 floats available.";
nglVertexAttrib2fvARB(index, values, values.position());
}
private static native void nglVertexAttrib2fvARB(int index, FloatBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib3ARB(int index, ShortBuffer values) {
assert values.remaining() >= 3: "<values> must have 3 shorts available.";
nglVertexAttrib3svARB(index, values, values.position());
}
private static native void nglVertexAttrib3svARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib3ARB(int index, FloatBuffer values) {
assert values.remaining() >= 3: "<values> must have 3 floats available.";
nglVertexAttrib3fvARB(index, values, values.position());
}
private static native void nglVertexAttrib3fvARB(int index, FloatBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4ARB(int index, ByteBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 bytes available.";
nglVertexAttrib4bvARB(index, values, values.position());
}
private static native void nglVertexAttrib4bvARB(int index, ByteBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4ARB(int index, ShortBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 shorts available.";
nglVertexAttrib4svARB(index, values, values.position());
}
private static native void nglVertexAttrib4svARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4ARB(int index, IntBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 ints available.";
nglVertexAttrib4ivARB(index, values, values.position());
}
private static native void nglVertexAttrib4ivARB(int index, IntBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4uARB(int index, ByteBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 bytes available.";
nglVertexAttrib4ubvARB(index, values, values.position());
}
private static native void nglVertexAttrib4ubvARB(int index, ByteBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4uARB(int index, ShortBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 shorts available.";
nglVertexAttrib4usvARB(index, values, values.position());
}
private static native void nglVertexAttrib4usvARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4uARB(int index, IntBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 ints available.";
nglVertexAttrib4uivARB(index, values, values.position());
}
private static native void nglVertexAttrib4uivARB(int index, IntBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4ARB(int index, FloatBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 floats available.";
nglVertexAttrib4fvARB(index, values, values.position());
}
private static native void nglVertexAttrib4fvARB(int index, FloatBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NARB(int index, ByteBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 bytes available.";
nglVertexAttrib4NbvARB(index, values, values.position());
}
private static native void nglVertexAttrib4NbvARB(int index, ByteBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NARB(int index, ShortBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 shorts available.";
nglVertexAttrib4NsvARB(index, values, values.position());
}
private static native void nglVertexAttrib4NsvARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NARB(int index, IntBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 ints available.";
nglVertexAttrib4NivARB(index, values, values.position());
}
private static native void nglVertexAttrib4NivARB(int index, IntBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NuARB(int index, ByteBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 bytes available.";
nglVertexAttrib4NubvARB(index, values, values.position());
}
private static native void nglVertexAttrib4NubvARB(int index, ByteBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NuARB(int index, ShortBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 shorts available.";
nglVertexAttrib4NusvARB(index, values, values.position());
}
private static native void nglVertexAttrib4NusvARB(int index, ShortBuffer values, int valuesOffset);
// ---------------------------
// ---------------------------
public static void glVertexAttrib4NuARB(int index, IntBuffer values) {
assert values.remaining() >= 4: "<values> must have 4 ints available.";
nglVertexAttrib4NuivARB(index, values, values.position());
}
private static native void nglVertexAttrib4NuivARB(int index, IntBuffer values, int valuesOffset);
// ---------------------------
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 ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());

View file

@ -158,12 +158,4 @@ public class NVRegisterCombiners {
nglGetFinalCombinerInputParameterivNV(variable, pname, piParams, piParams.position());
}
private static native void nglGetFinalCombinerInputParameterivNV(int variable, int pname, IntBuffer piParams, int piParams_offset);
public static void glCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
nglCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
nglGetCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglGetCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
}

View file

@ -39,7 +39,18 @@
*/
package org.lwjgl.opengl.nv;
import java.nio.FloatBuffer;
public class NVRegisterCombiners2
{
public static final int GL_PER_STAGE_CONSTANTS_NV = 0x8535;
public static void glCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
nglCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
nglGetCombinerStageParameterfvNV(stage, pname, pfParams, pfParams.position());
}
private static native void nglGetCombinerStageParameterfvNV(int stage, int pname, FloatBuffer pfParams, int pfParams_offset);
}

View file

@ -0,0 +1,53 @@
/*
* 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.
*/
/*
* Created by LWJGL.
* User: spasi
* Date: 2004-01-29
* Time: 3:20:43 pm
*/
package org.lwjgl.opengl.nv;
public class NVTextureCompressionVTC {
/*
* Accepted by the <internalformat> parameter of TexImage3D and
* CompressedTexImage3DARB and the <format> parameter of
* CompressedTexSubImage2DARB:
*/
public static final int COMPRESSED_RGB_S3TC_DXT1_EXT =0x83F0;
public static final int COMPRESSED_RGBA_S3TC_DXT1_EXT =0x83F1;
public static final int COMPRESSED_RGBA_S3TC_DXT3_EXT =0x83F2;
public static final int COMPRESSED_RGBA_S3TC_DXT5_EXT =0x83F3;
}