Extensions split out into separate classes
This commit is contained in:
parent
4510847487
commit
2b30f02fa8
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* 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: 17 Äåê 2003
|
||||||
|
* Time: 4:19:23 ðì
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
|
public interface ARBFragmentShader {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <shaderType> argument of CreateShaderObjectARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_FRAGMENT_SHADER_ARB = 0x8B30;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||||
|
* GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* 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: 29 Éáí 2004
|
||||||
|
* Time: 1:42:31 ðì
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
public class ARBOcclusionQuery {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <target> parameter of BeginQueryARB, EndQueryARB,
|
||||||
|
* and GetQueryivARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_SAMPLES_PASSED_ARB = 0x8914;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Accepted by the <pname> parameter of GetQueryivARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_QUERY_COUNTER_BITS_ARB = 0x8864;
|
||||||
|
public static final int GL_CURRENT_QUERY_ARB = 0x8865;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Accepted by the <pname> parameter of GetQueryObjectivARB and
|
||||||
|
GetQueryObjectuivARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_QUERY_RESULT_ARB = 0x8866;
|
||||||
|
public static final int GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867;
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGenQueriesARB(IntBuffer ids) {
|
||||||
|
nglGenQueriesARB(ids.remaining(), ids, ids.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGenQueriesARB(int n, IntBuffer ids, int idsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glDeleteQueriesARB(IntBuffer ids) {
|
||||||
|
nglDeleteQueriesARB(ids.remaining(), ids, ids.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglDeleteQueriesARB(int n, IntBuffer ids, int idsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
public static native boolean glIsQueryARB(int id);
|
||||||
|
|
||||||
|
public static native void glBeginQueryARB(int target, int id);
|
||||||
|
|
||||||
|
public static native void glEndQueryARB(int target);
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetQueryARB(int target, int pname, IntBuffer params) {
|
||||||
|
nglGetQueryivARB(target, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetQueryivARB(int target, int pname, IntBuffer params, int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetQueryObjectiARB(int id, int pname, IntBuffer params) {
|
||||||
|
nglGetQueryObjectiv(id, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetQueryObjectivARB(int id, int pname, IntBuffer params, int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetQueryObjectuiARB(int id, int pname, IntBuffer params) {
|
||||||
|
nglGetQueryObjectuivARB(id, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetQueryObjectuivARB(int id, int pname, IntBuffer params, int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
/**
|
||||||
|
* Created by zDimensions.
|
||||||
|
* User: spasi
|
||||||
|
* Date: 29 Éáí 2004
|
||||||
|
* Time: 1:54:00 ðì
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
|
public interface ARBPointSprite {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
|
||||||
|
* the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||||
|
* GetDoublev, and by the <target> parameter of TexEnvi, TexEnviv,
|
||||||
|
* TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv:
|
||||||
|
*/
|
||||||
|
public static final int POINT_SPRITE_ARB = 0x8861;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv,
|
||||||
|
* GetTexEnvfv, or GetTexEnviv is POINT_SPRITE_ARB, then the value of
|
||||||
|
* <pname> may be:
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static final int COORD_REPLACE_ARB = 0x8862;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,467 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 21:58:02
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
|
|
||||||
|
public class ARBShaderObjects {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> argument of GetHandleARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_PROGRAM_OBJECT_ARB = 0x8B40;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetObjectParameter{fi}vARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_OBJECT_TYPE_ARB = 0x8B4E;
|
||||||
|
public static final int GL_OBJECT_SUBTYPE_ARB = 0x8B4F;
|
||||||
|
public static final int GL_OBJECT_DELETE_STATUS_ARB = 0x8B80;
|
||||||
|
public static final int GL_OBJECT_COMPILE_STATUS_ARB = 0x8B81;
|
||||||
|
public static final int GL_OBJECT_LINK_STATUS_ARB = 0x8B82;
|
||||||
|
public static final int GL_OBJECT_VALIDATE_STATUS_ARB = 0x8B83;
|
||||||
|
public static final int GL_OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84;
|
||||||
|
public static final int GL_OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85;
|
||||||
|
public static final int GL_OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86;
|
||||||
|
public static final int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87;
|
||||||
|
public static final int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returned by the <params> parameter of GetObjectParameter{fi}vARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_SHADER_OBJECT_ARB = 0x8B48;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returned by the <type> parameter of GetActiveUniformARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_FLOAT_VEC2_ARB = 0x8B50;
|
||||||
|
public static final int GL_FLOAT_VEC3_ARB = 0x8B51;
|
||||||
|
public static final int GL_FLOAT_VEC4_ARB = 0x8B52;
|
||||||
|
public static final int GL_INT_VEC2_ARB = 0x8B53;
|
||||||
|
public static final int GL_INT_VEC3_ARB = 0x8B54;
|
||||||
|
public static final int GL_INT_VEC4_ARB = 0x8B55;
|
||||||
|
public static final int GL_BOOL_ARB = 0x8B56;
|
||||||
|
public static final int GL_BOOL_VEC2_ARB = 0x8B57;
|
||||||
|
public static final int GL_BOOL_VEC3_ARB = 0x8B58;
|
||||||
|
public static final int GL_BOOL_VEC4_ARB = 0x8B59;
|
||||||
|
public static final int GL_FLOAT_MAT2_ARB = 0x8B5A;
|
||||||
|
public static final int GL_FLOAT_MAT3_ARB = 0x8B5B;
|
||||||
|
public static final int GL_FLOAT_MAT4_ARB = 0x8B5C;
|
||||||
|
|
||||||
|
public static native void glDeleteObjectARB(int obj);
|
||||||
|
|
||||||
|
public static native int glGetHandleARB(int pname);
|
||||||
|
|
||||||
|
public static native void glDetachObjectARB(int containerObj, int attachedObj);
|
||||||
|
|
||||||
|
public static native int glCreateShaderObjectARB(int shaderType);
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
/**
|
||||||
|
* The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to
|
||||||
|
* define a shader program.
|
||||||
|
* <p/>
|
||||||
|
* This method uses just a single string, that should NOT be null-terminated.
|
||||||
|
*
|
||||||
|
* @param shaderObj
|
||||||
|
* @param string
|
||||||
|
*/
|
||||||
|
public static void glShaderSourceARB(int shaderObj, ByteBuffer string) {
|
||||||
|
initShaderSource(1);
|
||||||
|
setShaderString(0, string, string.position(), string.remaining());
|
||||||
|
|
||||||
|
nglShaderSourceARB(shaderObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to
|
||||||
|
* define a shader program.
|
||||||
|
* <p/>
|
||||||
|
* This method uses an array of strings, that should NOT be null-terminated.
|
||||||
|
*
|
||||||
|
* @param shaderObj
|
||||||
|
* @param strings
|
||||||
|
*/
|
||||||
|
public static void glShaderSourceARB(int shaderObj, ByteBuffer[] strings) {
|
||||||
|
initShaderSource(strings.length);
|
||||||
|
for ( int i = 0; i < strings.length; i++ )
|
||||||
|
setShaderString(i, strings[i], strings[i].position(), strings[i].remaining());
|
||||||
|
|
||||||
|
nglShaderSourceARB(shaderObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void initShaderSource(int count);
|
||||||
|
|
||||||
|
private static native void setShaderString(int index,
|
||||||
|
ByteBuffer string,
|
||||||
|
int stringOffset,
|
||||||
|
int stringLength);
|
||||||
|
|
||||||
|
private static native void nglShaderSourceARB(int shaderObj);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
public static native void glCompileShaderARB(int shaderObj);
|
||||||
|
|
||||||
|
public static native int glCreateProgramObjectARB();
|
||||||
|
|
||||||
|
public static native void glAttachObjectARB(int containerObj, int obj);
|
||||||
|
|
||||||
|
public static native void glLinkProgramARB(int programObj);
|
||||||
|
|
||||||
|
public static native void glUseProgramObjectARB(int programObj);
|
||||||
|
|
||||||
|
public static native void glValidateProgramARB(int programObj);
|
||||||
|
|
||||||
|
public static native void glUniform1fARB(int location, float v0);
|
||||||
|
|
||||||
|
public static native void glUniform2fARB(int location, float v0, float v1);
|
||||||
|
|
||||||
|
public static native void glUniform3fARB(int location, float v0, float v1, float v2);
|
||||||
|
|
||||||
|
public static native void glUniform4fARB(int location, float v0, float v1, float v2, float v3);
|
||||||
|
|
||||||
|
public static native void glUniform1iARB(int location, int v0);
|
||||||
|
|
||||||
|
public static native void glUniform2iARB(int location, int v0, int v1);
|
||||||
|
|
||||||
|
public static native void glUniform3iARB(int location, int v0, int v1, int v2);
|
||||||
|
|
||||||
|
public static native void glUniform4iARB(int location, int v0, int v1, int v2, int v3);
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform1ARB(int location, FloatBuffer values) {
|
||||||
|
nglUniform1fvARB(location, values.remaining(), values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform1fvARB(int location,
|
||||||
|
int count,
|
||||||
|
FloatBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform2ARB(int location, FloatBuffer values) {
|
||||||
|
nglUniform2fvARB(location, values.remaining() >> 1, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform2fvARB(int location,
|
||||||
|
int count,
|
||||||
|
FloatBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform3ARB(int location, FloatBuffer values) {
|
||||||
|
nglUniform3fvARB(location, values.remaining() / 3, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform3fvARB(int location,
|
||||||
|
int count,
|
||||||
|
FloatBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform4ARB(int location, FloatBuffer values) {
|
||||||
|
nglUniform4fvARB(location, values.remaining() >> 2, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform4fvARB(int location,
|
||||||
|
int count,
|
||||||
|
FloatBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform1ARB(int location, IntBuffer values) {
|
||||||
|
nglUniform1ivARB(location, values.remaining(), values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform1ivARB(int location,
|
||||||
|
int count,
|
||||||
|
IntBuffer values,
|
||||||
|
int valuesOffset);// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform2ARB(int location, IntBuffer values) {
|
||||||
|
nglUniform2ivARB(location, values.remaining() >> 1, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform2ivARB(int location,
|
||||||
|
int count,
|
||||||
|
IntBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform3ARB(int location, IntBuffer values) {
|
||||||
|
nglUniform3ivARB(location, values.remaining() / 3, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform3ivARB(int location,
|
||||||
|
int count,
|
||||||
|
IntBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniform4ARB(int location, IntBuffer values) {
|
||||||
|
nglUniform4ivARB(location, values.remaining() >> 2, values, values.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniform4ivARB(int location,
|
||||||
|
int count,
|
||||||
|
IntBuffer values,
|
||||||
|
int valuesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniformMatrix2ARB(int location, boolean transpose, FloatBuffer matrices) {
|
||||||
|
nglUniformMatrix2fvARB(location,
|
||||||
|
matrices.remaining() >> 2,
|
||||||
|
transpose,
|
||||||
|
matrices,
|
||||||
|
matrices.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniformMatrix2fvARB(int location,
|
||||||
|
int count,
|
||||||
|
boolean transpose,
|
||||||
|
FloatBuffer matrices,
|
||||||
|
int matricesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniformMatrix3ARB(int location, boolean transpose, FloatBuffer matrices) {
|
||||||
|
nglUniformMatrix3fvARB(location,
|
||||||
|
matrices.remaining() / ( 3 * 3 ),
|
||||||
|
transpose,
|
||||||
|
matrices,
|
||||||
|
matrices.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniformMatrix3fvARB(int location,
|
||||||
|
int count,
|
||||||
|
boolean transpose,
|
||||||
|
FloatBuffer matrices,
|
||||||
|
int matricesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glUniformMatrix4ARB(int location, boolean transpose, FloatBuffer matrices) {
|
||||||
|
nglUniformMatrix4fvARB(location,
|
||||||
|
matrices.remaining() >> 4,
|
||||||
|
transpose,
|
||||||
|
matrices,
|
||||||
|
matrices.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglUniformMatrix4fvARB(int location,
|
||||||
|
int count,
|
||||||
|
boolean transpose,
|
||||||
|
FloatBuffer matrices,
|
||||||
|
int matricesOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetObjectParameterARB(int obj, int pname, FloatBuffer params) {
|
||||||
|
nglGetObjectParameterfvARB(obj, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetObjectParameterfvARB(int obj,
|
||||||
|
int pname,
|
||||||
|
FloatBuffer params,
|
||||||
|
int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetObjectParameterARB(int obj, int pname, IntBuffer params) {
|
||||||
|
nglGetObjectParameterivARB(obj, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetObjectParameterivARB(int obj,
|
||||||
|
int pname,
|
||||||
|
IntBuffer params,
|
||||||
|
int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetInfoLogARB(int obj, IntBuffer length, ByteBuffer infoLog) {
|
||||||
|
if ( length == null )
|
||||||
|
nglGetInfoLogARB(obj, infoLog.remaining(), null, -1, infoLog, infoLog.position());
|
||||||
|
else {
|
||||||
|
assert length.remaining() > 0 : "<length> must have at least one element available.";
|
||||||
|
nglGetInfoLogARB(obj, infoLog.remaining(), length, length.position(), infoLog, infoLog.position());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetInfoLogARB(int obj,
|
||||||
|
int maxLength,
|
||||||
|
IntBuffer length,
|
||||||
|
int lengthOffset,
|
||||||
|
ByteBuffer infoLog,
|
||||||
|
int infoLogOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetAttachedObjectsARB(int containerObj,
|
||||||
|
IntBuffer count,
|
||||||
|
IntBuffer obj) {
|
||||||
|
if ( count == null )
|
||||||
|
nglGetAttachedObjectsARB(containerObj, obj.remaining(), null, -1, obj, obj.position());
|
||||||
|
else {
|
||||||
|
assert count.remaining() > 0 : "<count> must have at least one element available.";
|
||||||
|
nglGetAttachedObjectsARB(containerObj, obj.remaining(), count, count.position(), obj, obj.position());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetAttachedObjectsARB(int containerObj,
|
||||||
|
int maxCount,
|
||||||
|
IntBuffer count,
|
||||||
|
int countOffset,
|
||||||
|
IntBuffer obj,
|
||||||
|
int objOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static int glGetUniformLocationARB(int programObj, ByteBuffer name) {
|
||||||
|
assert name.get(name.limit()) == 0 : "<name> must be null-terminated.";
|
||||||
|
return nglGetUniformLocationARB(programObj, name, name.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native int nglGetUniformLocationARB(int programObj,
|
||||||
|
ByteBuffer name,
|
||||||
|
int nameOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetActiveUniformARB(int programObj,
|
||||||
|
int index,
|
||||||
|
IntBuffer length,
|
||||||
|
IntBuffer size,
|
||||||
|
IntBuffer type,
|
||||||
|
ByteBuffer name) {
|
||||||
|
assert size.remaining() > 0 : "<size> must have at least one element available.";
|
||||||
|
assert type.remaining() > 0 : "<type> must have at least one element available.";
|
||||||
|
|
||||||
|
if ( length == null )
|
||||||
|
nglGetActiveUniformARB(programObj,
|
||||||
|
index,
|
||||||
|
name.remaining(),
|
||||||
|
null,
|
||||||
|
-1,
|
||||||
|
size,
|
||||||
|
size.position(),
|
||||||
|
type,
|
||||||
|
type.position(),
|
||||||
|
name,
|
||||||
|
name.position());
|
||||||
|
else {
|
||||||
|
assert length.remaining() > 0 : "<length> must have at least one element available.";
|
||||||
|
nglGetActiveUniformARB(programObj,
|
||||||
|
index,
|
||||||
|
name.remaining(),
|
||||||
|
length,
|
||||||
|
length.position(),
|
||||||
|
size,
|
||||||
|
size.position(),
|
||||||
|
type,
|
||||||
|
type.position(),
|
||||||
|
name,
|
||||||
|
name.position());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetActiveUniformARB(int programObj,
|
||||||
|
int index,
|
||||||
|
int maxLength,
|
||||||
|
IntBuffer length,
|
||||||
|
int lengthOffset,
|
||||||
|
IntBuffer size,
|
||||||
|
int sizeOffset,
|
||||||
|
IntBuffer type,
|
||||||
|
int typeOffset,
|
||||||
|
ByteBuffer name,
|
||||||
|
int nameOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetUniformARB(int programObj, int location, FloatBuffer params) {
|
||||||
|
nglGetUniformfvARB(programObj, location, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetUniformfvARB(int programObj,
|
||||||
|
int location,
|
||||||
|
FloatBuffer params,
|
||||||
|
int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetUniformARB(int programObj, int location, IntBuffer params) {
|
||||||
|
nglGetUniformivARB(programObj, location, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetUniformivARB(int programObj,
|
||||||
|
int location,
|
||||||
|
IntBuffer params,
|
||||||
|
int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetShaderSourceARB(int obj,
|
||||||
|
IntBuffer length,
|
||||||
|
ByteBuffer source) {
|
||||||
|
if ( length == null )
|
||||||
|
nglGetShaderSourceARB(obj, source.remaining(), null, -1, source, source.position());
|
||||||
|
else {
|
||||||
|
nglGetShaderSourceARB(obj, source.remaining(), length, length.position(), source, source.position());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetShaderSourceARB(int obj,
|
||||||
|
int maxLength,
|
||||||
|
IntBuffer length,
|
||||||
|
int lengthOffset,
|
||||||
|
ByteBuffer source,
|
||||||
|
int sourceOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* 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: 17 Äåê 2003
|
||||||
|
* Time: 3:58:43 ðì
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.arb;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
public class ARBVertexShader {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <shaderType> argument of CreateShaderObjectARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_VERTEX_SHADER_ARB = 0x8B31;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||||
|
* GetFloatv, and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A;
|
||||||
|
public static final int GL_MAX_VARYING_FLOATS_ARB = 0x8B4B;
|
||||||
|
public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C;
|
||||||
|
public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter GetObjectParameter{if}vARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89;
|
||||||
|
public static final int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A;
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) {
|
||||||
|
assert name.get(name.limit()) == 0 : "<name> must be a null-terminated string.";
|
||||||
|
nglBindAttribLocationARB(programObj, index, name, name.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglBindAttribLocationARB(int programObj, int index, ByteBuffer name,
|
||||||
|
int nameOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetActiveAttribARB(int programObj, int index, IntBuffer length,
|
||||||
|
IntBuffer size, IntBuffer type, ByteBuffer name) {
|
||||||
|
assert size.remaining() > 0 : "<size> must have at least one element available.";
|
||||||
|
assert type.remaining() > 0 : "<type> must have at least one element available.";
|
||||||
|
|
||||||
|
if ( length == null )
|
||||||
|
nglGetActiveAttribARB(programObj, index, name.remaining(), null, -1, size, size.position(),
|
||||||
|
type, type.position(), name, name.position());
|
||||||
|
else {
|
||||||
|
assert length.remaining() > 0 : "<length> must have at least one element available.";
|
||||||
|
nglGetActiveAttribARB(programObj, index, name.remaining(), length, length.position(), size,
|
||||||
|
size.position(), type, type.position(), name, name.position());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetActiveAttribARB(int programObj, int index, int maxLength,
|
||||||
|
IntBuffer length, int lengthOffset,
|
||||||
|
IntBuffer size, int sizeOffset, IntBuffer type,
|
||||||
|
int typeOffset, ByteBuffer name, int nameOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static int glGetAttribLocationARB(int programObj, ByteBuffer name) {
|
||||||
|
assert name.get(name.limit()) == 0 : "<name> must be null-terminated.";
|
||||||
|
return nglGetAttribLocationARB(programObj, name, name.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native int nglGetAttribLocationARB(int programObj, ByteBuffer name, int nameOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 21:04:41
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.ati;
|
||||||
|
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
public class ATIDrawBuffers {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameters of GetIntegerv, GetFloatv,
|
||||||
|
* and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_MAX_DRAW_BUFFERS_ATI = 0x8824;
|
||||||
|
public static final int GL_DRAW_BUFFER0_ATI = 0x8825;
|
||||||
|
public static final int GL_DRAW_BUFFER1_ATI = 0x8826;
|
||||||
|
public static final int GL_DRAW_BUFFER2_ATI = 0x8827;
|
||||||
|
public static final int GL_DRAW_BUFFER3_ATI = 0x8828;
|
||||||
|
public static final int GL_DRAW_BUFFER4_ATI = 0x8829;
|
||||||
|
public static final int GL_DRAW_BUFFER5_ATI = 0x882A;
|
||||||
|
public static final int GL_DRAW_BUFFER6_ATI = 0x882B;
|
||||||
|
public static final int GL_DRAW_BUFFER7_ATI = 0x882C;
|
||||||
|
public static final int GL_DRAW_BUFFER8_ATI = 0x882D;
|
||||||
|
public static final int GL_DRAW_BUFFER9_ATI = 0x882E;
|
||||||
|
public static final int GL_DRAW_BUFFER10_ATI = 0x882F;
|
||||||
|
public static final int GL_DRAW_BUFFER11_ATI = 0x8830;
|
||||||
|
public static final int GL_DRAW_BUFFER12_ATI = 0x8831;
|
||||||
|
public static final int GL_DRAW_BUFFER13_ATI = 0x8832;
|
||||||
|
public static final int GL_DRAW_BUFFER14_ATI = 0x8833;
|
||||||
|
public static final int GL_DRAW_BUFFER15_ATI = 0x8834;
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glDrawBuffersATI(IntBuffer buffers) {
|
||||||
|
assert buffers.remaining() > 0 : "<buffers> must have at least 1 integer available.";
|
||||||
|
nglDrawBuffersATI(buffers.remaining(), buffers, buffers.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglDrawBuffersATI(int size, IntBuffer buffers, int buffersOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 21:14:07
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.ati;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
public class ATIMapObjectBuffer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* glMapObjectBufferATI maps a gl object buffer to a ByteBuffer. The oldBuffer argument can be
|
||||||
|
* null, in which case a new ByteBuffer will be created, pointing to the returned memory. If
|
||||||
|
* oldBuffer is non-null, it will be returned if it points to the same mapped memory, otherwise a
|
||||||
|
* new ByteBuffer is created.
|
||||||
|
*
|
||||||
|
* @param size The size of the buffer area.
|
||||||
|
* @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping,
|
||||||
|
* it will be returned and no new buffer will be created. In that case, size is
|
||||||
|
* ignored.
|
||||||
|
*
|
||||||
|
* @return A ByteBuffer representing the mapped object buffer memory.
|
||||||
|
*/
|
||||||
|
public static native ByteBuffer glMapObjectBufferATI(int buffer, int size, ByteBuffer oldBuffer);
|
||||||
|
|
||||||
|
public static native void glUnmapObjectBufferATI(int buffer);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 21:25:07
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.ati;
|
||||||
|
|
||||||
|
public interface ATITextureFloat {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <internalFormat> parameter of TexImage1D,
|
||||||
|
* TexImage2D, and TexImage3D:
|
||||||
|
*/
|
||||||
|
public static final int GL_RGBA_FLOAT32_ATI = 0x8814;
|
||||||
|
public static final int GL_RGB_FLOAT32_ATI = 0x8815;
|
||||||
|
public static final int GL_ALPHA_FLOAT32_ATI = 0x8816;
|
||||||
|
public static final int GL_INTENSITY_FLOAT32_ATI = 0x8817;
|
||||||
|
public static final int GL_LUMINANCE_FLOAT32_ATI = 0x8818;
|
||||||
|
public static final int GL_LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819;
|
||||||
|
public static final int GL_RGBA_FLOAT16_ATI = 0x881A;
|
||||||
|
public static final int GL_RGB_FLOAT16_ATI = 0x881B;
|
||||||
|
public static final int GL_ALPHA_FLOAT16_ATI = 0x881C;
|
||||||
|
public static final int GL_INTENSITY_FLOAT16_ATI = 0x881D;
|
||||||
|
public static final int GL_LUMINANCE_FLOAT16_ATI = 0x881E;
|
||||||
|
public static final int GL_LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 21:27:12
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.ati;
|
||||||
|
|
||||||
|
import java.nio.FloatBuffer;
|
||||||
|
import java.nio.IntBuffer;
|
||||||
|
|
||||||
|
public class ATIVertexAttribArrayObject {
|
||||||
|
|
||||||
|
public static native void glVertexAttribArrayObjectATI(int index, int size, int type,
|
||||||
|
boolean normalized, int stride, int buffer,
|
||||||
|
int offset);
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetVertexAttribArrayObjectATI(int index, int pname, FloatBuffer params) {
|
||||||
|
nglGetVertexAttribArrayObjectfvATI(index, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetVertexAttribArrayObjectfvATI(int index, int pname,
|
||||||
|
FloatBuffer params,
|
||||||
|
int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glGetVertexAttribArrayObjectATI(int index, int pname, IntBuffer params) {
|
||||||
|
nglGetVertexAttribArrayObjectivATI(index, pname, params, params.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglGetVertexAttribArrayObjectivATI(int index, int pname,
|
||||||
|
IntBuffer params, int paramsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 13:17:23
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
public interface NVFloatBuffer {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <internalformat> parameter of TexImage2D and
|
||||||
|
* CopyTexImage2D:
|
||||||
|
*/
|
||||||
|
public static final int GL_FLOAT_R_NV = 0x8880;
|
||||||
|
public static final int GL_FLOAT_RG_NV = 0x8881;
|
||||||
|
public static final int GL_FLOAT_RGB_NV = 0x8882;
|
||||||
|
public static final int GL_FLOAT_RGBA_NV = 0x8883;
|
||||||
|
public static final int GL_FLOAT_R16_NV = 0x8884;
|
||||||
|
public static final int GL_FLOAT_R32_NV = 0x8885;
|
||||||
|
public static final int GL_FLOAT_RG16_NV = 0x8886;
|
||||||
|
public static final int GL_FLOAT_RG32_NV = 0x8887;
|
||||||
|
public static final int GL_FLOAT_RGB16_NV = 0x8888;
|
||||||
|
public static final int GL_FLOAT_RGB32_NV = 0x8889;
|
||||||
|
public static final int GL_FLOAT_RGBA16_NV = 0x888A;
|
||||||
|
public static final int GL_FLOAT_RGBA32_NV = 0x888B;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetTexLevelParameterfv and
|
||||||
|
* GetTexLevelParameteriv:
|
||||||
|
*/
|
||||||
|
public static final int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||||
|
* and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D;
|
||||||
|
public static final int GL_FLOAT_RGBA_MODE_NV = 0x888E;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted in the <piAttributes> array of wglGetPixelFormatAttribivARB and
|
||||||
|
* wglGetPixelFormatAttribfvARB and in the <piAttribIList> and
|
||||||
|
* <pfAttribFList> arrays of wglChoosePixelFormatARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_WGL_FLOAT_COMPONENTS_NV = 0x20B0;
|
||||||
|
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = 0x20B1;
|
||||||
|
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = 0x20B2;
|
||||||
|
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = 0x20B3;
|
||||||
|
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = 0x20B4;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted in the <piAttribIList> array of wglCreatePbufferARB and returned
|
||||||
|
* in the <value> parameter of wglQueryPbufferARB when <iAttribute> is
|
||||||
|
* WGL_TEXTURE_FORMAT_ARB:
|
||||||
|
*/
|
||||||
|
public static final int GL_WGL_TEXTURE_FLOAT_R_NV = 0x20B5;
|
||||||
|
public static final int GL_WGL_TEXTURE_FLOAT_RG_NV = 0x20B6;
|
||||||
|
public static final int GL_WGL_TEXTURE_FLOAT_RGB_NV = 0x20B7;
|
||||||
|
public static final int GL_WGL_TEXTURE_FLOAT_RGBA_NV = 0x20B8;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,132 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-17
|
||||||
|
* Time: 15:45:05
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
import java.nio.ShortBuffer;
|
||||||
|
|
||||||
|
public class NVHalfFloat {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <type> argument of VertexPointer, NormalPointer,
|
||||||
|
* ColorPointer, TexCoordPointer, FogCoordPointerEXT,
|
||||||
|
* SecondaryColorPointerEXT, VertexWeightPointerEXT, VertexAttribPointerNV,
|
||||||
|
* DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D,
|
||||||
|
* TexSubImage2D, TexSubImage3D, and GetTexImage:
|
||||||
|
*/
|
||||||
|
public static final int GL_HALF_FLOAT_NV = 0x140B;
|
||||||
|
|
||||||
|
public static native void glVertex2hNV(short x, short y);
|
||||||
|
|
||||||
|
public static native void glVertex3hNV(short x, short y, short z);
|
||||||
|
|
||||||
|
public static native void glVertex4hNV(short x, short y, short z, short w);
|
||||||
|
|
||||||
|
public static native void glNormal3hNV(short nx, short ny, short nz);
|
||||||
|
|
||||||
|
public static native void glColor3hNV(short red, short green, short blue);
|
||||||
|
|
||||||
|
public static native void glColor4hNV(short red, short green, short blue, short alpha);
|
||||||
|
|
||||||
|
public static native void glTexCoord1hNV(short s);
|
||||||
|
|
||||||
|
public static native void glTexCoord2hNV(short s, short t);
|
||||||
|
|
||||||
|
public static native void glTexCoord3hNV(short s, short t, short r);
|
||||||
|
|
||||||
|
public static native void glTexCoord4hNV(short s, short t, short r, short q);
|
||||||
|
|
||||||
|
public static native void glMultiTexCoord1hNV(int target, short s);
|
||||||
|
|
||||||
|
public static native void glMultiTexCoord2hNV(int target, short s, short t);
|
||||||
|
|
||||||
|
public static native void glMultiTexCoord3hNV(int target, short s, short t, short r);
|
||||||
|
|
||||||
|
public static native void glMultiTexCoord4hNV(int target, short s, short t, short r, short q);
|
||||||
|
|
||||||
|
public static native void glFogCoordhNV(short fog);
|
||||||
|
|
||||||
|
public static native void glSecondaryColor3hNV(short red, short green, short blue);
|
||||||
|
|
||||||
|
public static native void glVertexWeighthNV(short weight);
|
||||||
|
|
||||||
|
public static native void glVertexAttrib1hNV(int index, short x);
|
||||||
|
|
||||||
|
public static native void glVertexAttrib2hNV(int index, short x, short y);
|
||||||
|
|
||||||
|
public static native void glVertexAttrib3hNV(int index, short x, short y, short z);
|
||||||
|
|
||||||
|
public static native void glVertexAttrib4hNV(int index, short x, short y, short z, short w);
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glVertexAttribs1hNV(int index, ShortBuffer attribs) {
|
||||||
|
nglVertexAttribs1hvNV(index, attribs.remaining(), attribs, attribs.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglVertexAttribs1hvNV(int index, int n, ShortBuffer attribs,
|
||||||
|
int attribsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glVertexAttribs2hNV(int index, ShortBuffer attribs) {
|
||||||
|
nglVertexAttribs2hvNV(index, attribs.remaining() >> 1, attribs, attribs.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglVertexAttribs2hvNV(int index, int n, ShortBuffer attribs,
|
||||||
|
int attribsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glVertexAttribs3hNV(int index, ShortBuffer attribs) {
|
||||||
|
nglVertexAttribs3hvNV(index, attribs.remaining() / 3, attribs, attribs.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglVertexAttribs3hvNV(int index, int n, ShortBuffer attribs,
|
||||||
|
int attribsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glVertexAttribs4hNV(int index, ShortBuffer attribs) {
|
||||||
|
nglVertexAttribs4hvNV(index, attribs.remaining() >> 2, attribs, attribs.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglVertexAttribs4hvNV(int index, int n, ShortBuffer attribs,
|
||||||
|
int attribsOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 17:19:22
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
public interface NVMultisampleFilterHint {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <target> parameter of Hint and by the <pname>
|
||||||
|
* parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 17:22:44
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
import java.nio.*;
|
||||||
|
|
||||||
|
public class NVPixelDataRange {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <target> parameter of PixelDataRangeNV and
|
||||||
|
* FlushPixelDataRangeNV, and by the <cap> parameter of
|
||||||
|
* EnableClientState, DisableClientState, and IsEnabled:
|
||||||
|
*/
|
||||||
|
public static final int GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878;
|
||||||
|
public static final int GL_READ_PIXEL_DATA_RANGE_NV = 0x8879;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||||
|
* GetFloatv, and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A;
|
||||||
|
public static final int GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetPointerv:
|
||||||
|
*/
|
||||||
|
public static final int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C;
|
||||||
|
public static final int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D;
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
public static void glPixelDataRangeNV(int target, ByteBuffer data) {
|
||||||
|
nglPixelDataRangeNV(target, data.remaining(), data, data.position());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void glPixelDataRangeNV(int target, ShortBuffer data) {
|
||||||
|
nglPixelDataRangeNV(target, data.remaining() << 1, data, data.position() << 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void glPixelDataRangeNV(int target, IntBuffer data) {
|
||||||
|
nglPixelDataRangeNV(target, data.remaining() << 2, data, data.position() << 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void glPixelDataRangeNV(int target, FloatBuffer data) {
|
||||||
|
nglPixelDataRangeNV(target, data.remaining() << 2, data, data.position() << 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native void nglPixelDataRangeNV(int target, int length, Buffer data,
|
||||||
|
int dataOffset);
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
public static native void glFlushPixelDataRangeNV(int target);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 17:45:36
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
public class NVPrimitiveRestart {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <array> parameter of EnableClientState and
|
||||||
|
* DisableClientState, by the <cap> parameter of IsEnabled, and by
|
||||||
|
* the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||||
|
* GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_PRIMITIVE_RESTART_NV = 0x8558;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||||
|
* GetFloatv, and GetDoublev:
|
||||||
|
*/
|
||||||
|
public static final int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559;
|
||||||
|
|
||||||
|
public static native void glPrimitiveRestartNV();
|
||||||
|
|
||||||
|
public static native void glPrimitiveRestartIndexNV(int index);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* 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: 2003-12-16
|
||||||
|
* Time: 17:54:31
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.lwjgl.opengl.nv;
|
||||||
|
|
||||||
|
public interface NVTextureExpandNormal {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accepted by the <pname> parameters of TexParameteri,
|
||||||
|
* TexParameteriv, TexParameterf, TexParameterfv, GetTexParameteri,
|
||||||
|
* and GetTexParameteriv:
|
||||||
|
*/
|
||||||
|
public static final int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F;
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue