mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Extensions split out into separate classes
This commit is contained in:
parent
8bcedbffe0
commit
583254e4db
170 changed files with 12063 additions and 759 deletions
|
|
@ -76,18 +76,13 @@ public abstract class GLCaps {
|
|||
public static boolean GL_ARB_window_pos;
|
||||
public static boolean GL_EXT_abgr;
|
||||
public static boolean GL_EXT_bgra;
|
||||
public static boolean GL_EXT_blend_color;
|
||||
public static boolean GL_EXT_blend_function_separate;
|
||||
public static boolean GL_EXT_blend_minmax;
|
||||
public static boolean GL_EXT_blend_subtract;
|
||||
public static boolean GL_EXT_compiled_vertex_array;
|
||||
public static boolean GL_EXT_cull_vertex;
|
||||
public static boolean GL_EXT_draw_range_elements;
|
||||
public static boolean GL_EXT_fog_coord;
|
||||
public static boolean GL_EXT_light_max_exponent;
|
||||
public static boolean GL_EXT_multi_draw_arrays;
|
||||
public static boolean GL_EXT_fog_coord;
|
||||
public static boolean GL_EXT_packed_pixels;
|
||||
public static boolean GL_EXT_paletted_texture;
|
||||
public static boolean GL_EXT_point_parameters;
|
||||
public static boolean GL_EXT_rescale_normal;
|
||||
public static boolean GL_EXT_secondary_color;
|
||||
|
|
@ -101,8 +96,6 @@ public abstract class GLCaps {
|
|||
public static boolean GL_EXT_texture_env_dot3;
|
||||
public static boolean GL_EXT_texture_filter_anisotropic;
|
||||
public static boolean GL_EXT_texture_lod_bias;
|
||||
public static boolean GL_EXT_texture_rectangle;
|
||||
public static boolean GL_EXT_vertex_array;
|
||||
public static boolean GL_EXT_vertex_shader;
|
||||
public static boolean GL_EXT_vertex_weighting;
|
||||
public static boolean GL_ATI_element_array;
|
||||
|
|
@ -115,7 +108,6 @@ public abstract class GLCaps {
|
|||
public static boolean GL_ATI_separate_stencil;
|
||||
public static boolean GL_ATIX_point_sprites;
|
||||
public static boolean GL_ATIX_texture_env_route;
|
||||
public static boolean GL_HP_occlusion_test;
|
||||
public static boolean GL_NV_blend_square;
|
||||
public static boolean GL_NV_copy_depth_to_color;
|
||||
public static boolean GL_NV_depth_clamp;
|
||||
|
|
@ -138,25 +130,11 @@ public abstract class GLCaps {
|
|||
public static boolean GL_NV_vertex_array_range2;
|
||||
public static boolean GL_NV_vertex_program;
|
||||
public static boolean GL_NV_vertex_program1_1;
|
||||
public static boolean GL_SGIS_generate_mipmap;
|
||||
public static boolean GL_SGIX_shadow;
|
||||
public static boolean GL_SGIX_depth_texture;
|
||||
public static boolean OpenGL11;
|
||||
public static boolean OpenGL12;
|
||||
public static boolean OpenGL13;
|
||||
public static boolean OpenGL14;
|
||||
|
||||
/*
|
||||
* Available WGL extensions
|
||||
*/
|
||||
public static boolean WGL_ARB_buffer_region;
|
||||
public static boolean WGL_ARB_extensions_string;
|
||||
public static boolean WGL_ARB_pbuffer;
|
||||
public static boolean WGL_ARB_pixel_format;
|
||||
public static boolean WGL_ARB_render_texture;
|
||||
public static boolean WGL_EXT_extensions_string;
|
||||
public static boolean WGL_EXT_swap_control;
|
||||
|
||||
static {
|
||||
System.loadLibrary(Sys.getLibraryName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
class StateStack {
|
||||
public class StateStack {
|
||||
/** Only int state is tracked */
|
||||
private final int[] state_stack;
|
||||
private int stack_pos;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
class VBOTracker {
|
||||
public class VBOTracker {
|
||||
private static VBOTracker default_tracker = new VBOTracker();
|
||||
private static VBOTracker current_tracker = default_tracker;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBCubeMap
|
||||
{
|
||||
public class ARBCubeMap {
|
||||
public static final int GL_NORMAL_MAP_ARB = 0x8511;
|
||||
public static final int GL_REFLECTION_MAP_ARB = 0x8512;
|
||||
public static final int GL_TEXTURE_CUBE_MAP_ARB = 0x8513;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBDepthTexture
|
||||
{
|
||||
public class ARBDepthTexture {
|
||||
public static final int GL_DEPTH_COMPONENT16_ARB = 0x81A5;
|
||||
public static final int GL_DEPTH_COMPONENT24_ARB = 0x81A6;
|
||||
public static final int GL_DEPTH_COMPONENT32_ARB = 0x81A7;
|
||||
|
|
|
|||
|
|
@ -1,122 +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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* * 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
|
||||
* * 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
|
||||
* 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
|
||||
* 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 IntelliJ IDEA.
|
||||
* User: nj
|
||||
* Date: 12-08-2002
|
||||
* Time: 16:02:30
|
||||
* To change template for new interface use
|
||||
* Code Style | Class Templates options (Tools | IDE Options).
|
||||
* Created by zDimensions.
|
||||
* User: spasi
|
||||
* Date: 2003-11-28
|
||||
* Time: 16:41:02
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBFragmentProgram
|
||||
{
|
||||
public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804;
|
||||
public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
|
||||
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
|
||||
public static final int GL_PROGRAM_FORMAT_ARB = 0x8876;
|
||||
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;
|
||||
public static final int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0;
|
||||
public static final int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1;
|
||||
public static final int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3;
|
||||
public static final int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4;
|
||||
public static final int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5;
|
||||
public static final int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7;
|
||||
public static final int GL_PROGRAM_PARAMETERS_ARB = 0x88A8;
|
||||
public static final int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9;
|
||||
public static final int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB;
|
||||
public static final int GL_PROGRAM_ATTRIBS_ARB = 0x88AC;
|
||||
public static final int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD;
|
||||
public static final int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF;
|
||||
public static final int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4;
|
||||
public static final int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5;
|
||||
public static final int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6;
|
||||
public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805;
|
||||
public static final int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806;
|
||||
public static final int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807;
|
||||
public static final int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808;
|
||||
public static final int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809;
|
||||
public static final int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A;
|
||||
public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B;
|
||||
public static final int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C;
|
||||
public static final int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810;
|
||||
public static final int GL_PROGRAM_STRING_ARB = 0x8628;
|
||||
public static final int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B;
|
||||
public static final int GL_CURRENT_MATRIX_ARB = 0x8641;
|
||||
public static final int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7;
|
||||
public static final int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640;
|
||||
public static final int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F;
|
||||
public static final int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E;
|
||||
public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871;
|
||||
public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
|
||||
public static final int GL_PROGRAM_ERROR_STRING_ARB = 0x8874;
|
||||
public static final int GL_MATRIX0_ARB = 0x88C0;
|
||||
public static final int GL_MATRIX1_ARB = 0x88C1;
|
||||
public static final int GL_MATRIX2_ARB = 0x88C2;
|
||||
public static final int GL_MATRIX3_ARB = 0x88C3;
|
||||
public static final int GL_MATRIX4_ARB = 0x88C4;
|
||||
public static final int GL_MATRIX5_ARB = 0x88C5;
|
||||
public static final int GL_MATRIX6_ARB = 0x88C6;
|
||||
public static final int GL_MATRIX7_ARB = 0x88C7;
|
||||
public static final int GL_MATRIX8_ARB = 0x88C8;
|
||||
public static final int GL_MATRIX9_ARB = 0x88C9;
|
||||
public static final int GL_MATRIX10_ARB = 0x88CA;
|
||||
public static final int GL_MATRIX11_ARB = 0x88CB;
|
||||
public static final int GL_MATRIX12_ARB = 0x88CC;
|
||||
public static final int GL_MATRIX13_ARB = 0x88CD;
|
||||
public static final int GL_MATRIX14_ARB = 0x88CE;
|
||||
public static final int GL_MATRIX15_ARB = 0x88CF;
|
||||
public static final int GL_MATRIX16_ARB = 0x88D0;
|
||||
public static final int GL_MATRIX17_ARB = 0x88D1;
|
||||
public static final int GL_MATRIX18_ARB = 0x88D2;
|
||||
public static final int GL_MATRIX19_ARB = 0x88D3;
|
||||
public static final int GL_MATRIX20_ARB = 0x88D4;
|
||||
public static final int GL_MATRIX21_ARB = 0x88D5;
|
||||
public static final int GL_MATRIX22_ARB = 0x88D6;
|
||||
public static final int GL_MATRIX23_ARB = 0x88D7;
|
||||
public static final int GL_MATRIX24_ARB = 0x88D8;
|
||||
public static final int GL_MATRIX25_ARB = 0x88D9;
|
||||
public static final int GL_MATRIX26_ARB = 0x88DA;
|
||||
public static final int GL_MATRIX27_ARB = 0x88DB;
|
||||
public static final int GL_MATRIX28_ARB = 0x88DC;
|
||||
public static final int GL_MATRIX29_ARB = 0x88DD;
|
||||
public static final int GL_MATRIX30_ARB = 0x88DE;
|
||||
public static final int GL_MATRIX31_ARB = 0x88DF;
|
||||
public class ARBFragmentProgram extends ARBProgram {
|
||||
|
||||
/*
|
||||
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled,
|
||||
* by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||
* and GetDoublev, and by the <target> parameter of ProgramStringARB,
|
||||
* BindProgramARB, ProgramEnvParameter4[df][v]ARB,
|
||||
* ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB,
|
||||
* GetProgramLocalParameter[df]vARB, GetProgramivARB and
|
||||
* GetProgramStringARB.
|
||||
*/
|
||||
public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetProgramivARB:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805;
|
||||
public static final int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806;
|
||||
public static final int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807;
|
||||
public static final int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808;
|
||||
public static final int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809;
|
||||
public static final int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A;
|
||||
public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B;
|
||||
public static final int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C;
|
||||
public static final int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
* GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871;
|
||||
public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,15 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBMatrixPalette
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class ARBMatrixPalette {
|
||||
public static final int GL_MATRIX_PALETTE_ARB = 0x8840;
|
||||
public static final int GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841;
|
||||
public static final int GL_MAX_PALETTE_MATRICES_ARB = 0x8842;
|
||||
|
|
@ -51,4 +58,39 @@ public interface ARBMatrixPalette
|
|||
public static final int GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847;
|
||||
public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848;
|
||||
public static final int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849;
|
||||
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglMatrixIndexPointerARBVBO(size, type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglMatrixIndexPointerARBVBO(int size, int type, int stride, int buffer_offset);
|
||||
|
||||
public static void glMatrixIndexuARB(ByteBuffer pIndices) {
|
||||
nglMatrixIndexubvARB(pIndices.remaining(), pIndices, pIndices.position());
|
||||
}
|
||||
private static native void nglMatrixIndexubvARB(int size, ByteBuffer pIndices, int pIndices_offset);
|
||||
|
||||
public static void glMatrixIndexuARB(IntBuffer piIndices) {
|
||||
nglMatrixIndexuivARB(piIndices.remaining(), piIndices, piIndices.position());
|
||||
}
|
||||
private static native void nglMatrixIndexuivARB(int size, IntBuffer piIndices, int piIndices_offset);
|
||||
|
||||
public static void glMatrixIndexuARB(ShortBuffer psIndices) {
|
||||
nglMatrixIndexusvARB(psIndices.remaining(), psIndices, psIndices.position());
|
||||
}
|
||||
private static native void nglMatrixIndexusvARB(int size, ShortBuffer psIndices, int psIndices_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBMultisample
|
||||
{
|
||||
public class ARBMultisample {
|
||||
public static final int GL_MULTISAMPLE_ARB = 0x809D;
|
||||
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E;
|
||||
public static final int GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F;
|
||||
|
|
@ -50,4 +49,6 @@ public interface ARBMultisample
|
|||
public static final int GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA;
|
||||
public static final int GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB;
|
||||
public static final int GL_MULTISAMPLE_BIT_ARB = 0x20000000;
|
||||
|
||||
public static native void glSampleCoverageARB(float value, boolean invert);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBMultitexture
|
||||
{
|
||||
public class ARBMultitexture {
|
||||
public static final int GL_TEXTURE0_ARB = 0x84C0;
|
||||
public static final int GL_TEXTURE1_ARB = 0x84C1;
|
||||
public static final int GL_TEXTURE2_ARB = 0x84C2;
|
||||
|
|
@ -76,4 +75,55 @@ public interface ARBMultitexture
|
|||
public static final int GL_ACTIVE_TEXTURE_ARB = 0x84E0;
|
||||
public static final int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1;
|
||||
public static final int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2;
|
||||
|
||||
public static native void glClientActiveTextureARB(int texture);
|
||||
|
||||
public static native void glActiveTextureARB(int texture);
|
||||
|
||||
public static native void glMultiTexCoord1fARB(int target, float s);
|
||||
|
||||
public static native void glMultiTexCoord1iARB(int target, int s);
|
||||
|
||||
public static native void glMultiTexCoord1sARB(int target, short s);
|
||||
|
||||
public static native void glMultiTexCoord2fARB(int target, float s, float t);
|
||||
|
||||
public static native void glMultiTexCoord2iARB(int target, int s, int t);
|
||||
|
||||
public static native void glMultiTexCoord2sARB(int target, short s, short t);
|
||||
|
||||
public static native void glMultiTexCoord3fARB(
|
||||
int target,
|
||||
float s,
|
||||
float t,
|
||||
float r);
|
||||
|
||||
public static native void glMultiTexCoord3iARB(int target, int s, int t, int r);
|
||||
|
||||
public static native void glMultiTexCoord3sARB(
|
||||
int target,
|
||||
short s,
|
||||
short t,
|
||||
short r);
|
||||
|
||||
public static native void glMultiTexCoord4fARB(
|
||||
int target,
|
||||
float s,
|
||||
float t,
|
||||
float r,
|
||||
float q);
|
||||
|
||||
public static native void glMultiTexCoord4iARB(
|
||||
int target,
|
||||
int s,
|
||||
int t,
|
||||
int r,
|
||||
int q);
|
||||
|
||||
public static native void glMultiTexCoord4sARB(
|
||||
int target,
|
||||
short s,
|
||||
short t,
|
||||
short r,
|
||||
short q);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,18 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBPointParameters
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class ARBPointParameters {
|
||||
public static final int GL_POINT_SIZE_MIN_ARB = 0x8126;
|
||||
public static final int GL_POINT_SIZE_MAX_ARB = 0x8127;
|
||||
public static final int GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128;
|
||||
public static final int GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129;
|
||||
|
||||
public static native void glPointParameterfARB(int pname, float param);
|
||||
|
||||
public static void glPointParameterARB(int pname, FloatBuffer pfParams) {
|
||||
nglPointParameterfvARB(pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglPointParameterfvARB(int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
}
|
||||
|
|
|
|||
236
src/java/org/lwjgl/opengl/arb/ARBProgram.java
Normal file
236
src/java/org/lwjgl/opengl/arb/ARBProgram.java
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
/*
|
||||
* 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-11-28
|
||||
* Time: 16:32:30
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
class ARBProgram {
|
||||
|
||||
/*
|
||||
* Accepted by the <format> parameter of ProgramStringARB:
|
||||
*/
|
||||
public final static int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetProgramivARB:
|
||||
*/
|
||||
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
|
||||
public static final int GL_PROGRAM_FORMAT_ARB = 0x8876;
|
||||
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;
|
||||
public static final int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0;
|
||||
public static final int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1;
|
||||
public static final int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3;
|
||||
public static final int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4;
|
||||
public static final int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5;
|
||||
public static final int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7;
|
||||
public static final int GL_PROGRAM_PARAMETERS_ARB = 0x88A8;
|
||||
public static final int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9;
|
||||
public static final int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB;
|
||||
public static final int GL_PROGRAM_ATTRIBS_ARB = 0x88AC;
|
||||
public static final int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD;
|
||||
public static final int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF;
|
||||
public static final int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4;
|
||||
public static final int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5;
|
||||
public static final int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetProgramStringARB:
|
||||
*/
|
||||
public static final int GL_PROGRAM_STRING_ARB = 0x8628;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
* GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B;
|
||||
public static final int GL_CURRENT_MATRIX_ARB = 0x8641;
|
||||
public static final int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7;
|
||||
public static final int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640;
|
||||
public static final int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F;
|
||||
public static final int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E;
|
||||
|
||||
/*
|
||||
* Accepted by the <name> parameter of GetString:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ERROR_STRING_ARB = 0x8874;
|
||||
|
||||
/*
|
||||
* Accepted by the <mode> parameter of MatrixMode:
|
||||
*/
|
||||
public static final int GL_MATRIX0_ARB = 0x88C0;
|
||||
public static final int GL_MATRIX1_ARB = 0x88C1;
|
||||
public static final int GL_MATRIX2_ARB = 0x88C2;
|
||||
public static final int GL_MATRIX3_ARB = 0x88C3;
|
||||
public static final int GL_MATRIX4_ARB = 0x88C4;
|
||||
public static final int GL_MATRIX5_ARB = 0x88C5;
|
||||
public static final int GL_MATRIX6_ARB = 0x88C6;
|
||||
public static final int GL_MATRIX7_ARB = 0x88C7;
|
||||
public static final int GL_MATRIX8_ARB = 0x88C8;
|
||||
public static final int GL_MATRIX9_ARB = 0x88C9;
|
||||
public static final int GL_MATRIX10_ARB = 0x88CA;
|
||||
public static final int GL_MATRIX11_ARB = 0x88CB;
|
||||
public static final int GL_MATRIX12_ARB = 0x88CC;
|
||||
public static final int GL_MATRIX13_ARB = 0x88CD;
|
||||
public static final int GL_MATRIX14_ARB = 0x88CE;
|
||||
public static final int GL_MATRIX15_ARB = 0x88CF;
|
||||
public static final int GL_MATRIX16_ARB = 0x88D0;
|
||||
public static final int GL_MATRIX17_ARB = 0x88D1;
|
||||
public static final int GL_MATRIX18_ARB = 0x88D2;
|
||||
public static final int GL_MATRIX19_ARB = 0x88D3;
|
||||
public static final int GL_MATRIX20_ARB = 0x88D4;
|
||||
public static final int GL_MATRIX21_ARB = 0x88D5;
|
||||
public static final int GL_MATRIX22_ARB = 0x88D6;
|
||||
public static final int GL_MATRIX23_ARB = 0x88D7;
|
||||
public static final int GL_MATRIX24_ARB = 0x88D8;
|
||||
public static final int GL_MATRIX25_ARB = 0x88D9;
|
||||
public static final int GL_MATRIX26_ARB = 0x88DA;
|
||||
public static final int GL_MATRIX27_ARB = 0x88DB;
|
||||
public static final int GL_MATRIX28_ARB = 0x88DC;
|
||||
public static final int GL_MATRIX29_ARB = 0x88DD;
|
||||
public static final int GL_MATRIX30_ARB = 0x88DE;
|
||||
public static final int GL_MATRIX31_ARB = 0x88DF;
|
||||
|
||||
// ---------------------------
|
||||
public static void glProgramStringARB(int target, int format, ByteBuffer string) {
|
||||
nglProgramStringARB(target, format, string.remaining(), string, string.position());
|
||||
}
|
||||
|
||||
private static native void nglProgramStringARB(int target, int format, int length, Buffer string, int stringOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glBindProgramARB(int target, int program);
|
||||
|
||||
// ---------------------------
|
||||
public static void glDeleteProgramsARB(IntBuffer programs) {
|
||||
nglDeleteProgramsARB(programs.remaining(), programs, programs.position());
|
||||
}
|
||||
|
||||
private static native void nglDeleteProgramsARB(int n, IntBuffer programs, int programsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGenProgramsARB(IntBuffer programs) {
|
||||
nglGenProgramsARB(programs.remaining(), programs, programs.position());
|
||||
}
|
||||
|
||||
private static native void nglGenProgramsARB(int n, IntBuffer programs, int programsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glProgramEnvParameter4fARB(
|
||||
int target,
|
||||
int index,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w);
|
||||
|
||||
// ---------------------------
|
||||
public static void glProgramEnvParameterARB(int target, int index, FloatBuffer params) {
|
||||
assert index >= 0 : "<index> must be greater than or equal to 0.";
|
||||
assert params.remaining() >= 4 : "<params> must have 4 floats available.";
|
||||
nglProgramEnvParameter4fvARB(target, index, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglProgramEnvParameter4fvARB(int target, int index, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glProgramLocalParameter4fARB(
|
||||
int target,
|
||||
int index,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w);
|
||||
|
||||
// ---------------------------
|
||||
public static void glProgramLocalParameterARB(int target, int index, FloatBuffer params) {
|
||||
assert index >= 0 : "<index> must be greater than or equal to 0.";
|
||||
assert params.remaining() >= 4 : "<params> must have 4 floats available.";
|
||||
nglProgramLocalParameter4fvARB(target, index, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglProgramLocalParameter4fvARB(int target, int index, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramEnvParameterARB(int target, int index, FloatBuffer params) {
|
||||
assert index >= 0 : "<index> must be greater than or equal to 0.";
|
||||
assert params.remaining() >= 4 : "<params> must have 4 floats available.";
|
||||
nglGetProgramEnvParameterfvARB(target, index, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramEnvParameterfvARB(int target, int index, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) {
|
||||
assert index >= 0 : "<index> must be greater than or equal to 0.";
|
||||
assert params.remaining() >= 4 : "<params> must have 4 floats available.";
|
||||
nglGetProgramLocalParameterfvARB(target, index, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramLocalParameterfvARB(int target, int index, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramARB(int target, int parameterName, IntBuffer params) {
|
||||
nglGetProgramivARB(target, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramivARB(int target, int parameterName, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramStringARB(int target, int parameterName, ByteBuffer paramString) {
|
||||
nglGetProgramStringARB(target, parameterName, paramString, paramString.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramStringARB(int target, int parameterName, Buffer paramString, int paramStringOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native boolean glIsProgramARB(int program);
|
||||
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBShadow
|
||||
public class ARBShadow
|
||||
{
|
||||
public static final int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C;
|
||||
public static final int GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBShadowAmbient
|
||||
public class ARBShadowAmbient
|
||||
{
|
||||
public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTextureBorderClamp
|
||||
public class ARBTextureBorderClamp
|
||||
{
|
||||
public static final int GL_CLAMP_TO_BORDER_ARB = 0x812D;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,13 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTextureCompression
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class ARBTextureCompression
|
||||
{
|
||||
public static final int GL_COMPRESSED_ALPHA_ARB = 0x84E9;
|
||||
public static final int GL_COMPRESSED_LUMINANCE_ARB = 0x84EA;
|
||||
|
|
@ -52,4 +58,98 @@ public interface ARBTextureCompression
|
|||
public static final int GL_TEXTURE_COMPRESSED_ARB = 0x86A1;
|
||||
public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2;
|
||||
public static final int GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3;
|
||||
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position()<<1);
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData, pData.position()<<2);
|
||||
}
|
||||
private static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_offset);
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position());
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) {
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position()<<1);
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, IntBuffer pImg) {
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position()<<2);
|
||||
}
|
||||
private static native void nglGetCompressedTexImageARB(int target, int lod, Buffer pImg, int pImg_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTextureEnvCombine
|
||||
public class ARBTextureEnvCombine
|
||||
{
|
||||
public static final int GL_COMBINE_ARB = 0x8570;
|
||||
public static final int GL_COMBINE_RGB_ARB = 0x8571;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTextureEnvDot3
|
||||
public class ARBTextureEnvDot3
|
||||
{
|
||||
public static final int GL_DOT3_RGB_ARB = 0x86AE;
|
||||
public static final int GL_DOT3_RGBA_ARB = 0x86AF;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTextureMirroredRepeat
|
||||
public class ARBTextureMirroredRepeat
|
||||
{
|
||||
public static final int GL_MIRRORED_REPEAT_ARB = 0x8370;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,21 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBTransposeMatrix
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class ARBTransposeMatrix {
|
||||
public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3;
|
||||
public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
|
||||
public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
|
||||
public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6;
|
||||
|
||||
public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) {
|
||||
nglLoadTransposeMatrixfARB(pfMtx, pfMtx.position());
|
||||
}
|
||||
private static native void nglLoadTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
|
||||
|
||||
public static void glMultTransposeMatrixfARB(FloatBuffer pfMtx) {
|
||||
nglMultTransposeMatrixfARB(pfMtx, pfMtx.position());
|
||||
}
|
||||
private static native void nglMultTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBVertexBlend
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class ARBVertexBlend {
|
||||
public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4;
|
||||
public static final int GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5;
|
||||
public static final int GL_WEIGHT_SUM_UNITY_ARB = 0x86A6;
|
||||
|
|
@ -83,4 +91,63 @@ public interface ARBVertexBlend
|
|||
public static final int GL_MODELVIEW29_ARB = 0x873D;
|
||||
public static final int GL_MODELVIEW30_ARB = 0x873E;
|
||||
public static final int GL_MODELVIEW31_ARB = 0x873F;
|
||||
|
||||
public static void glWeightARB(ByteBuffer pWeights) {
|
||||
nglWeightbvARB(pWeights.remaining(), pWeights, pWeights.position());
|
||||
}
|
||||
private static native void nglWeightbvARB(int size, ByteBuffer pWeights, int pWeights_offset);
|
||||
|
||||
public static void glWeightARB(FloatBuffer pfWeights) {
|
||||
nglWeightfvARB(pfWeights.remaining(), pfWeights, pfWeights.position());
|
||||
}
|
||||
private static native void nglWeightfvARB(int size, FloatBuffer pfWeights, int pfWeights_offset);
|
||||
|
||||
public static void glWeightARB(IntBuffer piWeights) {
|
||||
nglWeightivARB(piWeights.remaining(), piWeights, piWeights.position());
|
||||
}
|
||||
private static native void nglWeightivARB(int size, IntBuffer piWeights, int piWeights_offset);
|
||||
|
||||
public static void glWeightARB(ShortBuffer psWeights) {
|
||||
nglWeightsvARB(psWeights.remaining(), psWeights, psWeights.position());
|
||||
}
|
||||
private static native void nglWeightsvARB(int size, ShortBuffer psWeights, int psWeights_offset);
|
||||
|
||||
public static void glWeightuARB(ByteBuffer pWeights) {
|
||||
nglWeightubvARB(pWeights.remaining(), pWeights, pWeights.position());
|
||||
}
|
||||
private static native void nglWeightubvARB(int size, ByteBuffer pWeights, int pWeights_offset);
|
||||
|
||||
public static void glWeightuARB(IntBuffer piWeights) {
|
||||
nglWeightuivARB(piWeights.remaining(), piWeights, piWeights.position());
|
||||
}
|
||||
private static native void nglWeightuivARB(int size, IntBuffer piWeights, int piWeights_offset);
|
||||
|
||||
public static void glWeightuARB(ShortBuffer psWeights) {
|
||||
nglWeightusvARB(psWeights.remaining(), psWeights, psWeights.position());
|
||||
}
|
||||
private static native void nglWeightusvARB(int size, ShortBuffer psWeights, int psWeights_offset);
|
||||
|
||||
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglWeightPointerARBVBO(size, type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglWeightPointerARBVBO(int size, int type, int stride, int buffer_offset);
|
||||
public static native void glVertexBlendARB(int count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,15 @@
|
|||
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBVertexBufferObject
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
|
||||
public class ARBVertexBufferObject {
|
||||
public static final int GL_ARRAY_BUFFER_ARB = 0x8892;
|
||||
public static final int GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893;
|
||||
public static final int GL_ARRAY_BUFFER_BINDING_ARB = 0x8894;
|
||||
|
|
@ -74,4 +81,97 @@ public interface ARBVertexBufferObject
|
|||
public static final int GL_BUFFER_ACCESS_ARB = 0x88BB;
|
||||
public static final int GL_BUFFER_MAPPED_ARB = 0x88BC;
|
||||
public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
|
||||
|
||||
public static void glBindBufferARB(int target, int buffer) {
|
||||
switch (target) {
|
||||
case GL_ELEMENT_ARRAY_BUFFER_ARB:
|
||||
VBOTracker.getVBOElementStack().setState(buffer);
|
||||
break;
|
||||
case GL_ARRAY_BUFFER_ARB:
|
||||
VBOTracker.getVBOArrayStack().setState(buffer);
|
||||
break;
|
||||
default: assert false: "Unsupported VBO target " + target;
|
||||
}
|
||||
nglBindBufferARB(target, buffer);
|
||||
}
|
||||
private static native void nglBindBufferARB(int target, int buffer);
|
||||
public static void glDeleteBuffersARB(IntBuffer buffers) {
|
||||
for (int i = buffers.position(); i < buffers.limit(); i++) {
|
||||
int buffer_handle = buffers.get(i);
|
||||
if (VBOTracker.getVBOElementStack().getState() == buffer_handle)
|
||||
VBOTracker.getVBOElementStack().setState(0);
|
||||
if (VBOTracker.getVBOArrayStack().getState() == buffer_handle)
|
||||
VBOTracker.getVBOArrayStack().setState(0);
|
||||
}
|
||||
nglDeleteBuffersARB(buffers.remaining(), buffers, buffers.position());
|
||||
}
|
||||
private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_offset);
|
||||
public static void glGenBuffersARB(IntBuffer buffers) {
|
||||
nglGenBuffersARB(buffers.remaining(), buffers, buffers.position());
|
||||
}
|
||||
private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_offset);
|
||||
public static native boolean glIsBufferARB(int buffer);
|
||||
public static void glBufferDataARB(int target, int size, ByteBuffer data, int usage) {
|
||||
nglBufferDataARB(target, size, data, data != null ? data.position() : 0, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, int size, ShortBuffer data, int usage) {
|
||||
nglBufferDataARB(target, size, data, data != null ? data.position()<<1 : 0, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, int size, FloatBuffer data, int usage) {
|
||||
nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, int size, IntBuffer data, int usage) {
|
||||
nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage);
|
||||
}
|
||||
private static native void nglBufferDataARB(int target, int size, Buffer data, int data_offset, int usage);
|
||||
public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
nglBufferSubDataARB(target, offset, data.remaining(), data, data.position());
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
nglBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1);
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) {
|
||||
nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2);
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, IntBuffer data) {
|
||||
nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2);
|
||||
}
|
||||
private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset);
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
nglGetBufferSubDataARB(target, offset, data.remaining(), data, data.position());
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
nglGetBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1);
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) {
|
||||
nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2);
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) {
|
||||
nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2);
|
||||
}
|
||||
private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset);
|
||||
/**
|
||||
* glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in
|
||||
* which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null,
|
||||
* it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created.
|
||||
* That way, an application will normally use glMapBufferARB like this:
|
||||
*
|
||||
* ByteBuffer mapped_buffer;
|
||||
* mapped_buffer = glMapBufferARB(..., ..., ..., null);
|
||||
* ...
|
||||
* // Another map on the same buffer
|
||||
* mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer);
|
||||
*
|
||||
* @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 buffer memory.
|
||||
*/
|
||||
public static native ByteBuffer glMapBufferARB(int target, int access, int size, ByteBuffer oldBuffer);
|
||||
public static native boolean glUnmapBufferARB(int target);
|
||||
public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) {
|
||||
nglGetBufferParameterivARB(target, pname, params, params.position());
|
||||
}
|
||||
private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_offset);
|
||||
public static native ByteBuffer glGetBufferPointerARB(int target, int pname, int size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,123 +1,342 @@
|
|||
/*
|
||||
/*
|
||||
* 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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* * 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
|
||||
* * 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
|
||||
* 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
|
||||
* 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 IntelliJ IDEA.
|
||||
* User: nj
|
||||
* Date: 12-08-2002
|
||||
* Time: 16:02:30
|
||||
* To change template for new interface use
|
||||
* Code Style | Class Templates options (Tools | IDE Options).
|
||||
* Created by LWJGL.
|
||||
* User: spasi
|
||||
* Date: 2003-11-28
|
||||
* Time: 16:39:44
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public interface ARBVertexProgram
|
||||
{
|
||||
public static final int GL_VERTEX_PROGRAM_ARB = 0x8620;
|
||||
public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642;
|
||||
public static final int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
|
||||
public static final int GL_COLOR_SUM_ARB = 0x8458;
|
||||
public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
|
||||
public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
|
||||
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
|
||||
public static final int GL_PROGRAM_FORMAT_ARB = 0x8876;
|
||||
public static final int GL_PROGRAM_BINDING_ARB = 0x8677;
|
||||
public static final int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0;
|
||||
public static final int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1;
|
||||
public static final int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3;
|
||||
public static final int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4;
|
||||
public static final int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5;
|
||||
public static final int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7;
|
||||
public static final int GL_PROGRAM_PARAMETERS_ARB = 0x88A8;
|
||||
public static final int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9;
|
||||
public static final int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB;
|
||||
public static final int GL_PROGRAM_ATTRIBS_ARB = 0x88AC;
|
||||
public static final int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD;
|
||||
public static final int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF;
|
||||
public static final int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0;
|
||||
public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
|
||||
public static final int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3;
|
||||
public static final int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4;
|
||||
public static final int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5;
|
||||
public static final int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6;
|
||||
public static final int GL_PROGRAM_STRING_ARB = 0x8628;
|
||||
public static final int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B;
|
||||
public static final int GL_CURRENT_MATRIX_ARB = 0x8641;
|
||||
public static final int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7;
|
||||
public static final int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640;
|
||||
public static final int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
|
||||
public static final int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F;
|
||||
public static final int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E;
|
||||
public static final int GL_PROGRAM_ERROR_STRING_ARB = 0x8874;
|
||||
public static final int GL_MATRIX0_ARB = 0x88C0;
|
||||
public static final int GL_MATRIX1_ARB = 0x88C1;
|
||||
public static final int GL_MATRIX2_ARB = 0x88C2;
|
||||
public static final int GL_MATRIX3_ARB = 0x88C3;
|
||||
public static final int GL_MATRIX4_ARB = 0x88C4;
|
||||
public static final int GL_MATRIX5_ARB = 0x88C5;
|
||||
public static final int GL_MATRIX6_ARB = 0x88C6;
|
||||
public static final int GL_MATRIX7_ARB = 0x88C7;
|
||||
public static final int GL_MATRIX8_ARB = 0x88C8;
|
||||
public static final int GL_MATRIX9_ARB = 0x88C9;
|
||||
public static final int GL_MATRIX10_ARB = 0x88CA;
|
||||
public static final int GL_MATRIX11_ARB = 0x88CB;
|
||||
public static final int GL_MATRIX12_ARB = 0x88CC;
|
||||
public static final int GL_MATRIX13_ARB = 0x88CD;
|
||||
public static final int GL_MATRIX14_ARB = 0x88CE;
|
||||
public static final int GL_MATRIX15_ARB = 0x88CF;
|
||||
public static final int GL_MATRIX16_ARB = 0x88D0;
|
||||
public static final int GL_MATRIX17_ARB = 0x88D1;
|
||||
public static final int GL_MATRIX18_ARB = 0x88D2;
|
||||
public static final int GL_MATRIX19_ARB = 0x88D3;
|
||||
public static final int GL_MATRIX20_ARB = 0x88D4;
|
||||
public static final int GL_MATRIX21_ARB = 0x88D5;
|
||||
public static final int GL_MATRIX22_ARB = 0x88D6;
|
||||
public static final int GL_MATRIX23_ARB = 0x88D7;
|
||||
public static final int GL_MATRIX24_ARB = 0x88D8;
|
||||
public static final int GL_MATRIX25_ARB = 0x88D9;
|
||||
public static final int GL_MATRIX26_ARB = 0x88DA;
|
||||
public static final int GL_MATRIX27_ARB = 0x88DB;
|
||||
public static final int GL_MATRIX28_ARB = 0x88DC;
|
||||
public static final int GL_MATRIX29_ARB = 0x88DD;
|
||||
public static final int GL_MATRIX30_ARB = 0x88DE;
|
||||
public static final int GL_MATRIX31_ARB = 0x88DF;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class ARBVertexProgram extends ARBProgram {
|
||||
|
||||
/*
|
||||
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the
|
||||
* <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev,
|
||||
* and by the <target> parameter of ProgramStringARB, BindProgramARB,
|
||||
* ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB,
|
||||
* GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB,
|
||||
* GetProgramivARB, and GetProgramStringARB.
|
||||
*/
|
||||
public static final int GL_VERTEX_PROGRAM_ARB = 0x8620;
|
||||
|
||||
/*
|
||||
* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by
|
||||
* the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||
* GetDoublev:
|
||||
*/
|
||||
public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642;
|
||||
public static final int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643;
|
||||
public static final int GL_COLOR_SUM_ARB = 0x8458;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB:
|
||||
*/
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A;
|
||||
public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetVertexAttribPointervARB:
|
||||
*/
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetProgramivARB:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0;
|
||||
public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
|
||||
public static final int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3;
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
* GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
|
||||
|
||||
public static native void glVertexAttrib1sARB(int index, short x);
|
||||
|
||||
public static native void glVertexAttrib1fARB(int index, float x);
|
||||
|
||||
public static native void glVertexAttrib2sARB(int index, short x, short y);
|
||||
|
||||
public static native void glVertexAttrib2fARB(int index, float x, float y);
|
||||
|
||||
public static native void glVertexAttrib3sARB(int index, short x, short y, short z);
|
||||
|
||||
public static native void glVertexAttrib3fARB(int index, float x, float y, float z);
|
||||
|
||||
public static native void glVertexAttrib4sARB(int index, short x, short y, short z, short w);
|
||||
|
||||
public static native void glVertexAttrib4fARB(int index, float x, float y, float z, float w);
|
||||
|
||||
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 ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, Buffer buffer, int bufferOffset);
|
||||
|
||||
// ---------------------------
|
||||
public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, int bufferOffset) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglVertexAttribPointerARBVBO(index, size, type, normalized, stride, bufferOffset);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointerARBVBO(int index, int size, int type, boolean normalized, int stride, int bufferOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glEnableVertexAttribArrayARB(int index);
|
||||
|
||||
public static native void glDisableVertexAttribArrayARB(int index);
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribARB(int index, int pname, FloatBuffer params) {
|
||||
assert params.remaining() > 0 : "<params> must have at least one element available.";
|
||||
nglGetVertexAttribfvARB(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribfvARB(int index, int pname, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribARB(int index, int pname, IntBuffer params) {
|
||||
assert params.remaining() > 0 : "<params> must have at least one element available.";
|
||||
nglGetVertexAttribivARB(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribivARB(int index, int pname, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native ByteBuffer glGetVertexAttribPointerARB(int index, int pname, int size);
|
||||
|
||||
}
|
||||
|
|
|
|||
49
src/java/org/lwjgl/opengl/arb/ARBWindowPos.java
Normal file
49
src/java/org/lwjgl/opengl/arb/ARBWindowPos.java
Normal file
|
|
@ -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.
|
||||
*/
|
||||
/*
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.arb;
|
||||
|
||||
public class ARBWindowPos {
|
||||
public static native void glWindowPos2fARB(float x, float y);
|
||||
|
||||
public static native void glWindowPos2iARB(int x, int y);
|
||||
|
||||
public static native void glWindowPos2sARB(short x, short y);
|
||||
|
||||
public static native void glWindowPos3fARB(float x, float y, float z);
|
||||
|
||||
public static native void glWindowPos3iARB(int x, int y, int z);
|
||||
|
||||
public static native void glWindowPos3sARB(short x, short y, short z);
|
||||
}
|
||||
|
|
@ -39,9 +39,40 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIElementArray
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class ATIElementArray {
|
||||
public static final int GL_ELEMENT_ARRAY_ATI = 0x8768;
|
||||
public static final int GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769;
|
||||
public static final int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A;
|
||||
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
private static native void nglElementPointerATI(int type, Buffer pPointer, int pPointer_offset);
|
||||
|
||||
public static void glElementPointerATI(int type, int buffer_offset) {
|
||||
assert VBOTracker.getVBOElementStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglElementPointerATIVBO(type, buffer_offset);
|
||||
}
|
||||
private static native void nglElementPointerATIVBO(int type, int buffer_offset);
|
||||
|
||||
public static native void glDrawElementArrayATI(int mode, int count);
|
||||
public static native void glDrawRangeElementArrayATI(int mode, int start, int end, int count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIEnvmapBumpmap
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class ATIEnvmapBumpmap {
|
||||
public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775;
|
||||
public static final int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776;
|
||||
public static final int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777;
|
||||
|
|
@ -49,4 +51,24 @@ public interface ATIEnvmapBumpmap
|
|||
public static final int GL_DU8DV8_ATI = 0x877A;
|
||||
public static final int GL_BUMP_ENVMAP_ATI = 0x877B;
|
||||
public static final int GL_BUMP_TARGET_ATI = 0x877C;
|
||||
|
||||
public static void glTexBumpParameterATI(int pname, FloatBuffer pfParam) {
|
||||
nglTexBumpParameterfvATI(pname, pfParam, pfParam.position());
|
||||
}
|
||||
private static native void nglTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset);
|
||||
|
||||
public static void glTexBumpParameterATI(int pname, IntBuffer piParam) {
|
||||
nglTexBumpParameterivATI(pname, piParam, piParam.position());
|
||||
}
|
||||
private static native void nglTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset);
|
||||
|
||||
public static void glGetTexBumpParameterATI(int pname, FloatBuffer pfParam) {
|
||||
nglGetTexBumpParameterfvATI(pname, pfParam, pfParam.position());
|
||||
}
|
||||
private static native void nglGetTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset);
|
||||
|
||||
public static void glGetTexBumpParameterATI(int pname, IntBuffer piParam) {
|
||||
nglGetTexBumpParameterivATI(pname, piParam, piParam.position());
|
||||
}
|
||||
private static native void nglGetTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,9 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIFragmentShader
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class ATIFragmentShader {
|
||||
public static final int GL_FRAGMENT_SHADER_ATI = 0x8920;
|
||||
public static final int GL_REG_0_ATI = 0x8921;
|
||||
public static final int GL_REG_1_ATI = 0x8922;
|
||||
|
|
@ -149,4 +150,92 @@ public interface ATIFragmentShader
|
|||
public static final int GL_COMP_BIT_ATI = 0x00000002;
|
||||
public static final int GL_NEGATE_BIT_ATI = 0x00000004;
|
||||
public static final int GL_BIAS_BIT_ATI = 0x00000008;
|
||||
|
||||
public static native int glGenFragmentShadersATI(int range);
|
||||
|
||||
public static native void glBindFragmentShaderATI(int id);
|
||||
|
||||
public static native void glDeleteFragmentShaderATI(int id);
|
||||
|
||||
public static native void glBeginFragmentShaderATI();
|
||||
|
||||
public static native void glEndFragmentShaderATI();
|
||||
|
||||
public static native void glPassTexCoordATI(int dst, int coord, int swizzle);
|
||||
|
||||
public static native void glSampleMapATI(int dst, int interp, int swizzle);
|
||||
|
||||
public static native void glColorFragmentOp1ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMask,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod);
|
||||
|
||||
public static native void glColorFragmentOp2ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMask,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod,
|
||||
int arg2,
|
||||
int arg2Rep,
|
||||
int arg2Mod);
|
||||
|
||||
public static native void glColorFragmentOp3ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMask,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod,
|
||||
int arg2,
|
||||
int arg2Rep,
|
||||
int arg2Mod,
|
||||
int arg3,
|
||||
int arg3Rep,
|
||||
int arg3Mod);
|
||||
|
||||
public static native void glAlphaFragmentOp1ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod);
|
||||
|
||||
public static native void glAlphaFragmentOp2ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod,
|
||||
int arg2,
|
||||
int arg2Rep,
|
||||
int arg2Mod);
|
||||
|
||||
public static native void glAlphaFragmentOp3ATI(
|
||||
int op,
|
||||
int dst,
|
||||
int dstMod,
|
||||
int arg1,
|
||||
int arg1Rep,
|
||||
int arg1Mod,
|
||||
int arg2,
|
||||
int arg2Rep,
|
||||
int arg2Mod,
|
||||
int arg3,
|
||||
int arg3Rep,
|
||||
int arg3Mod);
|
||||
|
||||
public static void glSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue) {
|
||||
nglSetFragmentShaderConstantATI(dst, pfValue, pfValue.position());
|
||||
}
|
||||
private static native void nglSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue, int pfValue_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIPnTriangles
|
||||
{
|
||||
public class ATIPnTriangles {
|
||||
public static final int GL_PN_TRIANGLES_ATI = 0x87F0;
|
||||
public static final int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1;
|
||||
public static final int GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2;
|
||||
|
|
@ -50,4 +49,8 @@ public interface ATIPnTriangles
|
|||
public static final int GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6;
|
||||
public static final int GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7;
|
||||
public static final int GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8;
|
||||
|
||||
public static native void glPNTrianglesfATI(int pname, float param);
|
||||
|
||||
public static native void glPNTrianglesiATI(int pname, int param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,9 +39,12 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATISeparateStencil {
|
||||
public class ATISeparateStencil {
|
||||
public static final int GL_STENCIL_BACK_FUNC_ATI = 0x8800;
|
||||
public static final int GL_STENCIL_BACK_FAIL_ATI = 0x8801;
|
||||
public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802;
|
||||
public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803;
|
||||
|
||||
public static native void glStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass);
|
||||
public static native void glStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATITextureMirrorOnce
|
||||
public class ATITextureMirrorOnce
|
||||
{
|
||||
public static final int GL_MIRROR_CLAMP_ATI = 0x8742;
|
||||
public static final int GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,13 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIVertexArrayObject
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class ATIVertexArrayObject {
|
||||
public static final int GL_STATIC_ATI = 0x8760;
|
||||
public static final int GL_DYNAMIC_ATI = 0x8761;
|
||||
public static final int GL_PRESERVE_ATI = 0x8762;
|
||||
|
|
@ -49,4 +54,78 @@ public interface ATIVertexArrayObject
|
|||
public static final int GL_OBJECT_BUFFER_USAGE_ATI = 0x8765;
|
||||
public static final int GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766;
|
||||
public static final int GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767;
|
||||
|
||||
public static int glNewObjectBufferATI(int size, ByteBuffer pPointer, int usage) {
|
||||
return nglNewObjectBufferATI(size, pPointer, pPointer != null ? pPointer.position() : 0, usage);
|
||||
}
|
||||
public static int glNewObjectBufferATI(int size, ShortBuffer pPointer, int usage) {
|
||||
return nglNewObjectBufferATI(size, pPointer, pPointer != null ? pPointer.position()<<1 : 0, usage);
|
||||
}
|
||||
public static int glNewObjectBufferATI(int size, FloatBuffer pPointer, int usage) {
|
||||
return nglNewObjectBufferATI(size, pPointer, pPointer != null ? pPointer.position()<<2 : 0, usage);
|
||||
}
|
||||
public static int glNewObjectBufferATI(int size, IntBuffer pPointer, int usage) {
|
||||
return nglNewObjectBufferATI(size, pPointer, pPointer != null ? pPointer.position()<<2 : 0, usage);
|
||||
}
|
||||
private static native int nglNewObjectBufferATI(int size, Buffer pPointer, int pPointer_offset, int usage);
|
||||
public static native boolean glIsObjectBufferATI(int buffer);
|
||||
|
||||
public static void glUpdateObjectBufferATI(int buffer, int offset, ByteBuffer pPointer, int preserve) {
|
||||
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining(), pPointer, pPointer.position(), preserve);
|
||||
}
|
||||
public static void glUpdateObjectBufferATI(int buffer, int offset, ShortBuffer pPointer, int preserve) {
|
||||
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining()<<1, pPointer, pPointer.position()<<1, preserve);
|
||||
}
|
||||
public static void glUpdateObjectBufferATI(int buffer, int offset, FloatBuffer pPointer, int preserve) {
|
||||
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining()<<2, pPointer, pPointer.position()<<2, preserve);
|
||||
}
|
||||
public static void glUpdateObjectBufferATI(int buffer, int offset, IntBuffer pPointer, int preserve) {
|
||||
nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining()<<2, pPointer, pPointer.position()<<2, preserve);
|
||||
}
|
||||
private static native void nglUpdateObjectBufferATI(int buffer, int offset, int size, Buffer pPointer, int pPointer_offset, int preserve);
|
||||
|
||||
public static void glGetObjectBufferATI(int buffer, int pname, FloatBuffer pfParams) {
|
||||
nglGetObjectBufferfvATI(buffer, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetObjectBufferfvATI(int buffer, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetObjectBufferATI(int buffer, int pname, IntBuffer piParams) {
|
||||
nglGetObjectBufferivATI(buffer, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetObjectBufferivATI(int buffer, int pname, IntBuffer piParams, int piParams_offset);
|
||||
public static native void glFreeObjectBufferATI(int buffer);
|
||||
public static native void glArrayObjectATI(
|
||||
int array,
|
||||
int size,
|
||||
int type,
|
||||
int stride,
|
||||
int buffer,
|
||||
int offset);
|
||||
|
||||
public static void glGetArrayObjectATI(int array, int pname, FloatBuffer pfParams) {
|
||||
nglGetArrayObjectfvATI(array, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetArrayObjectfvATI(int array, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetArrayObjectATI(int array, int pname, IntBuffer piParams) {
|
||||
nglGetArrayObjectivATI(array, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetArrayObjectivATI(int array, int pname, IntBuffer piParams, int piParams_offset);
|
||||
|
||||
public static native void glVariantArrayObjectATI(
|
||||
int id,
|
||||
int type,
|
||||
int stride,
|
||||
int buffer,
|
||||
int offset);
|
||||
|
||||
public static void glGetVariantArrayObjectATI(int id, int pname, FloatBuffer pfParams) {
|
||||
nglGetVariantArrayObjectfvATI(id, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetVariantArrayObjectfvATI(int id, int pname, FloatBuffer pfParams, int pfParams_offset_offset);
|
||||
|
||||
public static void glGetVariantArrayObjectATI(int id, int pname, IntBuffer piParams) {
|
||||
nglGetVariantArrayObjectivATI(id, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetVariantArrayObjectivATI(int id, int pname, IntBuffer piParams, int piParams_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ati;
|
||||
|
||||
public interface ATIVertexStreams
|
||||
{
|
||||
public class ATIVertexStreams {
|
||||
public static final int GL_MAX_VERTEX_STREAMS_ATI = 0x876B;
|
||||
public static final int GL_VERTEX_SOURCE_ATI = 0x876C;
|
||||
public static final int GL_VERTEX_STREAM0_ATI = 0x876D;
|
||||
|
|
@ -51,4 +50,39 @@ public interface ATIVertexStreams
|
|||
public static final int GL_VERTEX_STREAM5_ATI = 0x8772;
|
||||
public static final int GL_VERTEX_STREAM6_ATI = 0x8773;
|
||||
public static final int GL_VERTEX_STREAM7_ATI = 0x8774;
|
||||
|
||||
public static native void glVertexStream1fATI(int stream, float x);
|
||||
public static native void glVertexStream1iATI(int stream, int x);
|
||||
public static native void glVertexStream1sATI(int stream, short x);
|
||||
public static native void glVertexStream2fATI(int stream, float x, float y);
|
||||
public static native void glVertexStream2iATI(int stream, int x, int y);
|
||||
public static native void glVertexStream2sATI(int stream, short x, short y);
|
||||
public static native void glVertexStream3fATI(int stream, float x, float y, float z);
|
||||
public static native void glVertexStream3iATI(int stream, int x, int y, int z);
|
||||
public static native void glVertexStream3sATI(int stream, short x, short y, short z);
|
||||
public static native void glVertexStream4fATI(
|
||||
int stream,
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float w);
|
||||
public static native void glVertexStream4iATI(
|
||||
int stream,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int w);
|
||||
public static native void glVertexStream4sATI(
|
||||
int stream,
|
||||
short x,
|
||||
short y,
|
||||
short z,
|
||||
short w);
|
||||
public static native void glNormalStream3bATI(int stream, byte x, byte y, byte z);
|
||||
public static native void glNormalStream3fATI(int stream, float x, float y, float z);
|
||||
public static native void glNormalStream3iATI(int stream, int x, int y, int z);
|
||||
public static native void glNormalStream3sATI(int stream, short x, short y, short z);
|
||||
public static native void glClientActiveVertexStreamATI(int stream);
|
||||
public static native void glVertexBlendEnvfATI(int pname, float param);
|
||||
public static native void glVertexBlendEnviATI(int pname, int param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.atix;
|
||||
|
||||
public interface ATIXPointSprites
|
||||
{
|
||||
public class ATIXPointSprites {
|
||||
public static final int GL_TEXTURE_POINT_MODE_ATIX = 0x60b0;
|
||||
public static final int GL_TEXTURE_POINT_ONE_COORD_ATIX = 0x60b1;
|
||||
public static final int GL_TEXTURE_POINT_SPRITE_ATIX = 0x60b2;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.atix;
|
||||
|
||||
public interface ATIXTextureEnvRoute
|
||||
{
|
||||
public class ATIXTextureEnvRoute {
|
||||
public static final int GL_SECONDARY_COLOR_ATIX = 0x8747;
|
||||
public static final int GL_TEXTURE_OUTPUT_RGB_ATIX = 0x8748;
|
||||
public static final int GL_TEXTURE_OUTPUT_ALPHA_ATIX = 0x8749;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTAbgr
|
||||
{
|
||||
|
||||
public class EXTAbgr {
|
||||
public static final int GL_ABGR_EXT = 0x8000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @author cas
|
||||
*/
|
||||
public interface EXTBgra {
|
||||
public class EXTBgra {
|
||||
public static final int GL_BGR_EXT = 0x80E0;
|
||||
public static final int GL_BGRA_EXT = 0x80E1;
|
||||
}
|
||||
|
|
|
|||
46
src/java/org/lwjgl/opengl/ext/EXTBlendFuncSeparate.java
Normal file
46
src/java/org/lwjgl/opengl/ext/EXTBlendFuncSeparate.java
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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.ext;
|
||||
|
||||
/**
|
||||
* Insert the type's description here.
|
||||
* Creation date: (29/06/2000 00:45:10)
|
||||
*/
|
||||
public class EXTBlendFuncSeparate {
|
||||
public static final int GL_BLEND_DST_RGB_EXT = 0x80C8;
|
||||
public static final int GL_BLEND_SRC_RGB_EXT = 0x80C9;
|
||||
public static final int GL_BLEND_DST_ALPHA_EXT = 0x80CA;
|
||||
public static final int GL_BLEND_SRC_ALPHA_EXT = 0x80CB;
|
||||
|
||||
public static native void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha);
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ package org.lwjgl.opengl.ext;
|
|||
* EXT_blend_subtract constants
|
||||
* @author cas
|
||||
*/
|
||||
public interface EXTBlendSubtract {
|
||||
public class EXTBlendSubtract {
|
||||
public static final int GL_FUNC_SUBTRACT_EXT = 0x800A;
|
||||
public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTCompiledVertexArray
|
||||
{
|
||||
public class EXTCompiledVertexArray {
|
||||
public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8;
|
||||
public static final int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9;
|
||||
|
||||
public static native void glLockArraysEXT(int first, int count);
|
||||
public static native void glUnlockArraysEXT();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,35 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTDrawRangeElements
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class EXTDrawRangeElements {
|
||||
public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
|
||||
public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9;
|
||||
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
private static native void nglDrawRangeElementsEXT(int mode, int start, int end, int count, int type, Buffer pIndices, int pIndices_offset);
|
||||
|
||||
public static void glDrawRangeElementsEXT(int mode, int start, int end, int count, int type, int buffer_offset) {
|
||||
assert VBOTracker.getVBOElementStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglDrawRangeElementsEXTVBO(mode, start, end, count, type, buffer_offset);
|
||||
}
|
||||
private static native void nglDrawRangeElementsEXTVBO(int mode, int start, int end, int count, int type, int buffer_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,13 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTFogCoord
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class EXTFogCoord {
|
||||
public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450;
|
||||
public static final int GL_FOG_COORDINATE_EXT = 0x8451;
|
||||
public static final int GL_FRAGMENT_DEPTH_EXT = 0x8452;
|
||||
|
|
@ -50,4 +55,15 @@ public interface EXTFogCoord
|
|||
public static final int GL_FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456;
|
||||
public static final int GL_FOG_COORDINATE_ARRAY_EXT = 0x8457;
|
||||
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglFogCoordPointerEXTVBO(type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglFogCoordPointerEXTVBO(int type, int stride, int buffer_offset);
|
||||
}
|
||||
|
|
|
|||
50
src/java/org/lwjgl/opengl/ext/EXTMultiDrawArrays.java
Normal file
50
src/java/org/lwjgl/opengl/ext/EXTMultiDrawArrays.java
Normal file
|
|
@ -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 IntelliJ IDEA.
|
||||
* User: nj
|
||||
* Date: 12-08-2002
|
||||
* Time: 16:00:36
|
||||
* To change template for new interface use
|
||||
* Code Style | Class Templates options (Tools | IDE Options).
|
||||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class EXTMultiDrawArrays {
|
||||
public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) {
|
||||
assert piFirst.remaining() == piCount.remaining(): "piFirst.remaining() != piCount.remaining()";
|
||||
nglMultiDrawArraysEXT(mode, piFirst, piFirst.position(), piCount, piCount.position(), piFirst.remaining());
|
||||
}
|
||||
private static native void nglMultiDrawArraysEXT(int mode, IntBuffer piFirst, int piFirst_offset, IntBuffer piCount, int piCount_offset, int primcount);
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ package org.lwjgl.opengl.ext;
|
|||
* Insert the type's description here.
|
||||
* Creation date: (07/11/99 19:16:17)
|
||||
*/
|
||||
public interface EXTPackedPixels {
|
||||
public class EXTPackedPixels {
|
||||
public static final int GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032;
|
||||
public static final int GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033;
|
||||
public static final int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034;
|
||||
|
|
|
|||
|
|
@ -39,10 +39,18 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTPointParameters
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class EXTPointParameters {
|
||||
public static final int GL_POINT_SIZE_MIN_EXT = 0x8126;
|
||||
public static final int GL_POINT_SIZE_MAX_EXT = 0x8127;
|
||||
public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128;
|
||||
public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129;
|
||||
|
||||
public static native void glPointParameterfEXT(int pname, float param);
|
||||
|
||||
public static void glPointParameterEXT(int pname, FloatBuffer pfParams) {
|
||||
nglPointParameterfvEXT(pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglPointParameterfvEXT(int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ package org.lwjgl.opengl.ext;
|
|||
* EXT_rescale_normal
|
||||
* @author cas
|
||||
*/
|
||||
public interface EXTRescaleNormal {
|
||||
public class EXTRescaleNormal {
|
||||
public static final int GL_RESCALE_NORMAL_EXT = 0x803A;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,14 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTSecondaryColor
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class EXTSecondaryColor {
|
||||
public static final int GL_COLOR_SUM_EXT = 0x8458;
|
||||
public static final int GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459;
|
||||
public static final int GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A;
|
||||
|
|
@ -48,4 +54,26 @@ public interface EXTSecondaryColor
|
|||
public static final int GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C;
|
||||
public static final int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D;
|
||||
public static final int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E;
|
||||
|
||||
public static native void glSecondaryColor3bEXT(byte red, byte green, byte blue);
|
||||
|
||||
public static native void glSecondaryColor3fEXT(float red, float green, float blue);
|
||||
|
||||
public static native void glSecondaryColor3ubEXT(byte red, byte green, byte blue);
|
||||
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
private static native void nglSecondaryColorPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_offset);
|
||||
|
||||
public static void glSecondaryColorPointerEXT(int size, int type, int stride, int buffer_offset) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglSecondaryColorPointerEXTVBO(size, type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglSecondaryColorPointerEXTVBO(int size, int type, int stride, int buffer_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ package org.lwjgl.opengl.ext;
|
|||
* EXT_separate_specular_color constants.
|
||||
* @author cas
|
||||
*/
|
||||
public interface EXTSeparateSpecularColor {
|
||||
public class EXTSeparateSpecularColor {
|
||||
public static final int GL_SINGLE_COLOR_EXT = 0x81F9;
|
||||
public static final int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA;
|
||||
public static final int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ package org.lwjgl.opengl.ext;
|
|||
* Insert the type's description here.
|
||||
* Creation date: (07/11/99 19:15:54)
|
||||
*/
|
||||
public interface EXTSharedTexturePalette {
|
||||
public class EXTSharedTexturePalette {
|
||||
public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTStencilTwoSide
|
||||
{
|
||||
public class EXTStencilTwoSide {
|
||||
public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910;
|
||||
public static final int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911;
|
||||
|
||||
public static native void glActiveStencilFaceEXT(int face);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTStencilWrap
|
||||
public class EXTStencilWrap
|
||||
{
|
||||
public static final int GL_INCR_WRAP_EXT = 0x8507;
|
||||
public static final int GL_DECR_WRAP_EXT = 0x8508;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTTextureCompressionS3TC
|
||||
public class EXTTextureCompressionS3TC
|
||||
{
|
||||
public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
|
||||
public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ package org.lwjgl.opengl.ext;
|
|||
* Insert the type's description here.
|
||||
* Creation date: (22/02/00 01:26:05)
|
||||
*/
|
||||
public interface EXTTextureEnvCombine {
|
||||
public class EXTTextureEnvCombine {
|
||||
public static final int GL_COMBINE_EXT = 0x8570;
|
||||
public static final int GL_COMBINE_RGB_EXT = 0x8571;
|
||||
public static final int GL_COMBINE_ALPHA_EXT = 0x8572;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ package org.lwjgl.opengl.ext;
|
|||
* EXT_texture_env_dot3 constants.
|
||||
* @author cas
|
||||
*/
|
||||
public interface EXTTextureEnvDot3 {
|
||||
public class EXTTextureEnvDot3 {
|
||||
public static final int GL_DOT3_RGB_EXT = 0x8740;
|
||||
public static final int GL_DOT3_RGBA_EXT = 0x8741;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTTextureFilterAnisotropic
|
||||
public class EXTTextureFilterAnisotropic
|
||||
{
|
||||
public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
|
||||
public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTTextureLODBias
|
||||
public class EXTTextureLODBias
|
||||
{
|
||||
public static final int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500;
|
||||
public static final int GL_TEXTURE_LOD_BIAS_EXT = 0x8501;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,16 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTVertexShader
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
|
||||
public class EXTVertexShader {
|
||||
public static final int GL_VERTEX_SHADER_EXT = 0x8780;
|
||||
public static final int GL_VERTEX_SHADER_BINDING_EXT = 0x8781;
|
||||
public static final int GL_OP_INDEX_EXT = 0x8782;
|
||||
|
|
@ -151,4 +159,192 @@ public interface EXTVertexShader
|
|||
public static final int GL_INVARIANT_DATATYPE_EXT = 0x87EB;
|
||||
public static final int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC;
|
||||
public static final int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED;
|
||||
|
||||
public static native void glBeginVertexShaderEXT();
|
||||
public static native void glEndVertexShaderEXT();
|
||||
|
||||
public static native void glBindVertexShaderEXT(int id);
|
||||
|
||||
public static native int glGenVertexShadersEXT(int range);
|
||||
|
||||
public static native void glDeleteVertexShaderEXT(int id);
|
||||
|
||||
public static native void glShaderOp1EXT(int op, int res, int arg1);
|
||||
|
||||
public static native void glShaderOp2EXT(int op, int res, int arg1, int arg2);
|
||||
|
||||
public static native void glShaderOp3EXT(
|
||||
int op,
|
||||
int res,
|
||||
int arg1,
|
||||
int arg2,
|
||||
int arg3);
|
||||
|
||||
public static native void glSwizzleEXT(
|
||||
int res,
|
||||
int in,
|
||||
int outX,
|
||||
int outY,
|
||||
int outZ,
|
||||
int outW);
|
||||
|
||||
public static native void glWriteMaskEXT(
|
||||
int res,
|
||||
int in,
|
||||
int outX,
|
||||
int outY,
|
||||
int outZ,
|
||||
int outW);
|
||||
public static native void glInsertComponentEXT(int res, int src, int num);
|
||||
|
||||
public static native void glExtractComponentEXT(int res, int src, int num);
|
||||
|
||||
public static native int glGenSymbolsEXT(
|
||||
int dataType,
|
||||
int storageType,
|
||||
int range,
|
||||
int components);
|
||||
public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
|
||||
nglSetInvariantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_BYTE : CoreGL11Constants.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);
|
||||
}
|
||||
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
|
||||
nglSetInvariantEXT(id, CoreGL11Constants.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);
|
||||
}
|
||||
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());
|
||||
}
|
||||
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
|
||||
nglSetLocalConstantEXT(id, unsigned ? CoreGL11Constants.GL_UNSIGNED_SHORT : CoreGL11Constants.GL_SHORT, pAddr, pAddr.position()<<1);
|
||||
}
|
||||
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
|
||||
nglSetLocalConstantEXT(id, CoreGL11Constants.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);
|
||||
}
|
||||
private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_offset);
|
||||
|
||||
public static void glVariantEXT(int id, ByteBuffer pAddr) {
|
||||
nglVariantbvEXT(id, pAddr, pAddr.position());
|
||||
}
|
||||
private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_offset);
|
||||
|
||||
public static void glVariantEXT(int id, ShortBuffer psAddr) {
|
||||
nglVariantsvEXT(id, psAddr, psAddr.position());
|
||||
}
|
||||
private static native void nglVariantsvEXT(int id, ShortBuffer psAddr, int psAddr_offset);
|
||||
|
||||
public static void glVariantEXT(int id, FloatBuffer pfAddr) {
|
||||
nglVariantfvEXT(id, pfAddr, pfAddr.position());
|
||||
}
|
||||
private static native void nglVariantfvEXT(int id, FloatBuffer pfAddr, int pfAddr_offset);
|
||||
|
||||
public static void glVariantEXT(int id, IntBuffer piAddr) {
|
||||
nglVariantivEXT(id, piAddr, piAddr.position());
|
||||
}
|
||||
private static native void nglVariantivEXT(int id, IntBuffer piAddr, int piAddr_offset);
|
||||
|
||||
public static void glVariantuEXT(int id, ByteBuffer pAddr) {
|
||||
nglVariantubvEXT(id, pAddr, pAddr.position());
|
||||
}
|
||||
private static native void nglVariantubvEXT(int id, ByteBuffer pAddr, int pAddr_offset);
|
||||
|
||||
public static void glVariantuEXT(int id, ShortBuffer psAddr) {
|
||||
nglVariantusvEXT(id, psAddr, psAddr.position());
|
||||
}
|
||||
private static native void nglVariantusvEXT(int id, ShortBuffer psAddr, int psAddr_offset);
|
||||
|
||||
public static void glVariantuEXT(int id, IntBuffer piAddr) {
|
||||
nglVariantuivEXT(id, piAddr, piAddr.position());
|
||||
}
|
||||
private static native void nglVariantuivEXT(int id, IntBuffer piAddr, int piAddr_offset);
|
||||
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) {
|
||||
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());
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglVariantPointerEXTVBO(id, type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglVariantPointerEXTVBO(int id, int type, int stride, int buffer_offset);
|
||||
public static native void glEnableVariantClientStateEXT(int id);
|
||||
|
||||
public static native void glDisableVariantClientStateEXT(int id);
|
||||
|
||||
public static native int glBindLightParameterEXT(int light, int value);
|
||||
|
||||
public static native int glBindMaterialParameterEXT(int face, int value);
|
||||
|
||||
public static native int glBindTexGenParameterEXT(int unit, int coord, int value);
|
||||
|
||||
public static native int glBindTextureUnitParameterEXT(int unit, int value);
|
||||
|
||||
public static native int glBindParameterEXT(int value);
|
||||
public static native boolean glIsVariantEnabledEXT(int id, int cap);
|
||||
|
||||
public static void glGetVariantBooleanEXT(int id, int value, ByteBuffer pbData) {
|
||||
nglGetVariantBooleanvEXT(id, value, pbData, pbData.position());
|
||||
}
|
||||
private static native void nglGetVariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
|
||||
public static void glGetVariantIntegerEXT(int id, int value, IntBuffer piData) {
|
||||
nglGetVariantIntegervEXT(id, value, piData, piData.position());
|
||||
}
|
||||
private static native void nglGetVariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
|
||||
|
||||
public static void glGetVariantFloatEXT(int id, int value, FloatBuffer pfData) {
|
||||
nglGetVariantFloatvEXT(id, value, pfData, pfData.position());
|
||||
}
|
||||
private static native void nglGetVariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
|
||||
|
||||
public static native ByteBuffer glGetVariantPointerEXT(int id, int value, int size);
|
||||
public static void glGetInvariantBooleanEXT(int id, int value, ByteBuffer pbData) {
|
||||
nglGetInvariantBooleanvEXT(id, value, pbData, pbData.position());
|
||||
}
|
||||
private static native void nglGetInvariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
|
||||
|
||||
public static void glGetInvariantIntegerEXT(int id, int value, IntBuffer piData) {
|
||||
nglGetInvariantIntegervEXT(id, value, piData, piData.position());
|
||||
}
|
||||
private static native void nglGetInvariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
|
||||
|
||||
public static void glGetInvariantFloatEXT(int id, int value, FloatBuffer pfData) {
|
||||
nglGetInvariantFloatvEXT(id, value, pfData, pfData.position());
|
||||
}
|
||||
private static native void nglGetInvariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
|
||||
|
||||
public static void glGetLocalConstantBooleanEXT(int id, int value, ByteBuffer pbData) {
|
||||
nglGetLocalConstantBooleanvEXT(id, value, pbData, pbData.position());
|
||||
}
|
||||
private static native void nglGetLocalConstantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset);
|
||||
|
||||
public static void glGetLocalConstantIntegerEXT(int id, int value, IntBuffer piData) {
|
||||
nglGetLocalConstantIntegervEXT(id, value, piData, piData.position());
|
||||
}
|
||||
private static native void nglGetLocalConstantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset);
|
||||
|
||||
public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pfData) {
|
||||
nglGetLocalConstantFloatvEXT(id, value, pfData, pfData.position());
|
||||
}
|
||||
private static native void nglGetLocalConstantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,13 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.ext;
|
||||
|
||||
public interface EXTVertexWeighting
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class EXTVertexWeighting {
|
||||
public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; /* alias to MODELVIEW_STACK_DEPTH */
|
||||
public static final int GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502;
|
||||
public static final int GL_MODELVIEW0_MATRIX_EXT = 0x0BA6; /* alias to MODELVIEW_MATRIX */
|
||||
|
|
@ -54,4 +59,17 @@ public interface EXTVertexWeighting
|
|||
public static final int GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E;
|
||||
public static final int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F;
|
||||
public static final int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510;
|
||||
|
||||
public static native void glVertexWeightfEXT(float weight);
|
||||
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglVertexWeightPointerEXTVBO(size, type, stride, buffer_offset);
|
||||
}
|
||||
private static native void nglVertexWeightPointerEXTVBO(int size, int type, int stride, int buffer_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVCopyDepthToColor
|
||||
public class NVCopyDepthToColor
|
||||
{
|
||||
public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E;
|
||||
public static final int GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVDepthClamp
|
||||
public class NVDepthClamp
|
||||
{
|
||||
public static final int GL_DEPTH_CLAMP_NV = 0x864F;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,11 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVEvaluators
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class NVEvaluators {
|
||||
public static final int GL_EVAL_2D_NV = 0x86C0;
|
||||
public static final int GL_EVAL_TRIANGULAR_2D_NV = 0x86C1;
|
||||
public static final int GL_MAP_TESSELLATION_NV = 0x86C2;
|
||||
|
|
@ -65,4 +68,41 @@ public interface NVEvaluators
|
|||
public static final int GL_EVAL_VERTEX_ATTRIB15_NV = 0x86D5;
|
||||
public static final int GL_MAX_MAP_TESSELLATION_NV = 0x86D6;
|
||||
public static final int GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7;
|
||||
|
||||
public static void glGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, FloatBuffer pPoints) {
|
||||
nglGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints, pPoints.position()<<2);
|
||||
}
|
||||
private static native void nglGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, Buffer pPoints, int pPoints_offset);
|
||||
public static void glMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, FloatBuffer pPoints) {
|
||||
nglMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints, pPoints.position()<<2);
|
||||
}
|
||||
private static native void nglMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, Buffer pPoints, int pPoints_offset);
|
||||
public static void glMapParameterNV(int target, int pname, FloatBuffer pfParams) {
|
||||
nglMapParameterfvNV(target, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglMapParameterfvNV(int target, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
public static void glMapParameterNV(int target, int pname, IntBuffer piParams) {
|
||||
nglMapParameterivNV(target, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglMapParameterivNV(int target, int pname, IntBuffer piParams, int piParams_offset);
|
||||
|
||||
public static void glGetMapParameterNV(int target, int pname, FloatBuffer pfParams) {
|
||||
nglGetMapParameterfvNV(target, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetMapParameterfvNV(int target, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetMapParameterNV(int target, int pname, IntBuffer piParams) {
|
||||
nglGetMapParameterivNV(target, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetMapParameterivNV(int target, int pname, IntBuffer piParams, int piParams_offset);
|
||||
public static void glGetMapAttribParameterNV(int target, int index, int pname, FloatBuffer pfParams) {
|
||||
nglGetMapAttribParameterfvNV(target, index, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetMapAttribParameterfvNV(int target, int index, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetMapAttribParameterNV(int target, int index, int pname, IntBuffer piParams) {
|
||||
nglGetMapAttribParameterivNV(target, index, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetMapAttribParameterivNV(int target, int index, int pname, IntBuffer piParams, int piParams_offset);
|
||||
public static native void glEvalMapsNV(int target, int mode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,9 +39,32 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVFence
|
||||
{
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class NVFence {
|
||||
public static final int GL_ALL_COMPLETED_NV = 0x84F2;
|
||||
public static final int GL_FENCE_STATUS_NV = 0x84F3;
|
||||
public static final int GL_FENCE_CONDITION_NV = 0x84F4;
|
||||
|
||||
public static void glGenFencesNV(IntBuffer piFences) {
|
||||
nglGenFencesNV(piFences.remaining(), piFences, piFences.position());
|
||||
}
|
||||
private static native void nglGenFencesNV(int n, IntBuffer piFences, int piFences_offset);
|
||||
public static void glDeleteFencesNV(IntBuffer piFences) {
|
||||
nglDeleteFencesNV(piFences.remaining(), piFences, piFences.position());
|
||||
}
|
||||
private static native void nglDeleteFencesNV(int n, IntBuffer piFences, int piFences_offset);
|
||||
|
||||
public static native void glSetFenceNV(int fence, int condition);
|
||||
|
||||
public static native boolean glTestFenceNV(int fence);
|
||||
|
||||
public static native void glFinishFenceNV(int fence);
|
||||
|
||||
public static native boolean glIsFenceNV(int fence);
|
||||
|
||||
public static void glGetFenceNV(int fence, int pname, IntBuffer piParams) {
|
||||
nglGetFenceivNV(fence, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetFenceivNV(int fence, int pname, IntBuffer piParams, int piParams_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVFogDistance
|
||||
public class NVFogDistance
|
||||
{
|
||||
public static final int GL_FOG_DISTANCE_MODE_NV = 0x855A;
|
||||
public static final int GL_EYE_RADIAL_NV = 0x855B;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVLightMaxExponent
|
||||
{
|
||||
public class NVLightMaxExponent {
|
||||
public static final int GL_MAX_SHININESS_NV = 0x8504;
|
||||
public static final int GL_MAX_SPOT_EXPONENT_NV = 0x8505;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVOcclusionQuery
|
||||
{
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class NVOcclusionQuery {
|
||||
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
|
||||
public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
|
||||
/* HP_occlusion_test */
|
||||
|
|
@ -48,4 +49,28 @@ public interface NVOcclusionQuery
|
|||
public static final int GL_CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865;
|
||||
public static final int GL_PIXEL_COUNT_NV = 0x8866;
|
||||
public static final int GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867;
|
||||
|
||||
public static void glGenOcclusionQueriesNV(IntBuffer piIDs) {
|
||||
nglGenOcclusionQueriesNV(piIDs.remaining(), piIDs, piIDs.position());
|
||||
}
|
||||
private static native void nglGenOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_offset);
|
||||
public static void glDeleteOcclusionQueriesNV(IntBuffer piIDs) {
|
||||
nglDeleteOcclusionQueriesNV(piIDs.remaining(), piIDs, piIDs.position());
|
||||
}
|
||||
private static native void nglDeleteOcclusionQueriesNV(int n, IntBuffer piIDs, int piIDs_offset);
|
||||
|
||||
public static native boolean glIsOcclusionQueryNV(int id);
|
||||
public static native void glBeginOcclusionQueryNV(int id);
|
||||
|
||||
public static native void glEndOcclusionQueryNV();
|
||||
|
||||
public static void glGetOcclusionQueryNV(int id, int pname, IntBuffer piParams) {
|
||||
nglGetOcclusionQueryivNV(id, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetOcclusionQueryivNV(int id, int pname, IntBuffer piParams, int piParams_offset);
|
||||
|
||||
public static void glGetOcclusionQueryuNV(int id, int pname, IntBuffer piParams) {
|
||||
nglGetOcclusionQueryuivNV(id, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetOcclusionQueryuivNV(int id, int pname, IntBuffer piParams, int piParams_offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVPackedDepthStencil
|
||||
public class NVPackedDepthStencil
|
||||
{
|
||||
public static final int GL_DEPTH_STENCIL_NV = 0x84F9;
|
||||
public static final int GL_UNSIGNED_INT_24_8_NV = 0x84FA;
|
||||
|
|
|
|||
|
|
@ -39,9 +39,17 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVPointSprite
|
||||
{
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class NVPointSprite {
|
||||
public static final int GL_POINT_SPRITE_NV = 0x8861;
|
||||
public static final int GL_COORD_REPLACE_NV = 0x8862;
|
||||
public static final int GL_POINT_SPRITE_R_MODE_NV = 0x8863;
|
||||
|
||||
public static native void glPointParameteriNV(int pname, int param);
|
||||
|
||||
public static void glPointParameterNV(int pname, IntBuffer piParams) {
|
||||
nglPointParameterivNV(pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglPointParameterivNV(int pname, IntBuffer piParams, int piParams_offset);
|
||||
}
|
||||
|
|
|
|||
130
src/java/org/lwjgl/opengl/nv/NVProgram.java
Normal file
130
src/java/org/lwjgl/opengl/nv/NVProgram.java
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
* 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-11-28
|
||||
* Time: 18:39:30
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
class NVProgram {
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetProgramivNV:
|
||||
*/
|
||||
public static final int GL_PROGRAM_TARGET_NV = 0x8646;
|
||||
public static final int GL_PROGRAM_LENGTH_NV = 0x8627;
|
||||
public static final int GL_PROGRAM_RESIDENT_NV = 0x8647;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetProgramStringNV:
|
||||
*/
|
||||
public static final int GL_PROGRAM_STRING_NV = 0x8628;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ERROR_POSITION_NV = 0x864B;
|
||||
|
||||
/*
|
||||
Accepted by the <name> parameter of GetString:
|
||||
*/
|
||||
public static final int GL_PROGRAM_ERROR_STRING_NV = 0x8874;
|
||||
|
||||
// ---------------------------
|
||||
public static void glLoadProgramNV(int target, int programID, ByteBuffer string) {
|
||||
nglLoadProgramNV(target, programID, string.remaining(), string, string.position());
|
||||
}
|
||||
|
||||
private static native void nglLoadProgramNV(int target, int programID, int length, Buffer string, int stringOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glBindProgramNV(int target, int programID);
|
||||
|
||||
// ---------------------------
|
||||
public static void glDeleteProgramsNV(IntBuffer programs) {
|
||||
nglDeleteProgramsNV(programs.remaining(), programs, programs.position());
|
||||
}
|
||||
|
||||
private static native void nglDeleteProgramsNV(int n, IntBuffer programs, int programsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGenProgramsNV(IntBuffer programs) {
|
||||
nglGenProgramsNV(programs.remaining(), programs, programs.position());
|
||||
}
|
||||
|
||||
private static native void nglGenProgramsNV(int n, IntBuffer programs, int programsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramNV(int programID, int parameterName, IntBuffer params) {
|
||||
nglGetProgramivNV(programID, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramivNV(int programID, int parameterName, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramStringNV(int programID, int parameterName, ByteBuffer paramString) {
|
||||
nglGetProgramStringNV(programID, parameterName, paramString, paramString.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramStringNV(int programID, int parameterName, Buffer paramString, int paramStringOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native boolean glIsProgramNV(int programID);
|
||||
|
||||
// ---------------------------
|
||||
public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) {
|
||||
assert programIDs.remaining() == programResidences.remaining(): "programIDs.remaining() != programResidences.remaining()";
|
||||
return nglAreProgramsResidentNV(programIDs.remaining(), programIDs, programIDs.position(), programResidences, programResidences.position());
|
||||
}
|
||||
|
||||
private static native boolean nglAreProgramsResidentNV(int n, IntBuffer programIDs, int programIDsOffset, ByteBuffer programResidences, int programResidencesOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glRequestResidentProgramsNV(IntBuffer programIDs) {
|
||||
nglRequestResidentProgramsNV(programIDs.remaining(), programIDs, programIDs.position());
|
||||
}
|
||||
|
||||
private static native void nglRequestResidentProgramsNV(int n, IntBuffer programIDs, int programIDsOffset);
|
||||
// ---------------------------
|
||||
}
|
||||
|
|
@ -39,8 +39,10 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVRegisterCombiners
|
||||
{
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
public class NVRegisterCombiners {
|
||||
public static final int GL_REGISTER_COMBINERS_NV = 0x8522;
|
||||
public static final int GL_COMBINER0_NV = 0x8550;
|
||||
public static final int GL_COMBINER1_NV = 0x8551;
|
||||
|
|
@ -92,4 +94,76 @@ public interface NVRegisterCombiners
|
|||
public static final int GL_NUM_GENERAL_COMBINERS_NV = 0x854E;
|
||||
public static final int GL_COLOR_SUM_CLAMP_NV = 0x854F;
|
||||
public static final int GL_MAX_GENERAL_COMBINERS_NV = 0x854D;
|
||||
|
||||
public static native void glCombinerParameterfNV(int pname, float param);
|
||||
|
||||
public static void glCombinerParameterNV(int pname, FloatBuffer pfParams) {
|
||||
nglCombinerParameterfvNV(pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglCombinerParameterfvNV(int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static native void glCombinerParameteriNV(int pname, int param);
|
||||
|
||||
public static void glCombinerParameterNV(int pname, IntBuffer piParams) {
|
||||
nglCombinerParameterivNV(pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglCombinerParameterivNV(int pname, IntBuffer piParams, int piParams_offset);
|
||||
public static native void glCombinerInputNV(
|
||||
int stage,
|
||||
int portion,
|
||||
int variable,
|
||||
int input,
|
||||
int mapping,
|
||||
int componentUsage);
|
||||
public static native void glCombinerOutputNV(
|
||||
int stage,
|
||||
int portion,
|
||||
int abOutput,
|
||||
int cdOutput,
|
||||
int sumOutput,
|
||||
int scale,
|
||||
int bias,
|
||||
boolean abDotProduct,
|
||||
boolean cdDotProduct,
|
||||
boolean muxSum);
|
||||
public static native void glFinalCombinerInputNV(
|
||||
int variable,
|
||||
int input,
|
||||
int mapping,
|
||||
int componentUsage);
|
||||
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, FloatBuffer pfParams) {
|
||||
nglGetCombinerInputParameterfvNV(stage, portion, variable, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetCombinerInputParameterfvNV(int stage, int portion, int variable, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, IntBuffer piParams) {
|
||||
nglGetCombinerInputParameterivNV(stage, portion, variable, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetCombinerInputParameterivNV(int stage, int portion, int variable, int pname, IntBuffer piParams, int piParams_offset);
|
||||
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, FloatBuffer pfParams) {
|
||||
nglGetCombinerOutputParameterfvNV(stage, portion, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetCombinerOutputParameterfvNV(int stage, int portion, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, IntBuffer piParams) {
|
||||
nglGetCombinerOutputParameterivNV(stage, portion, pname, piParams, piParams.position());
|
||||
}
|
||||
private static native void nglGetCombinerOutputParameterivNV(int stage, int portion, int pname, IntBuffer piParams, int pfParams_offset);
|
||||
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, FloatBuffer pfParams) {
|
||||
nglGetFinalCombinerInputParameterfvNV(variable, pname, pfParams, pfParams.position());
|
||||
}
|
||||
private static native void nglGetFinalCombinerInputParameterfvNV(int variable, int pname, FloatBuffer pfParams, int pfParams_offset);
|
||||
|
||||
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, IntBuffer piParams) {
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVRegisterCombiners2
|
||||
public class NVRegisterCombiners2
|
||||
{
|
||||
public static final int GL_PER_STAGE_CONSTANTS_NV = 0x8535;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTexgenReflection
|
||||
public class NVTexgenReflection
|
||||
{
|
||||
public static final int GL_NORMAL_MAP_NV = 0x8511;
|
||||
public static final int GL_REFLECTION_MAP_NV = 0x8512;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTextureEnvCombine4
|
||||
public class NVTextureEnvCombine4
|
||||
{
|
||||
public static final int GL_COMBINE4_NV = 0x8503;
|
||||
public static final int GL_SOURCE3_RGB_NV = 0x8583;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTextureRectangle
|
||||
public class NVTextureRectangle
|
||||
{
|
||||
public static final int GL_TEXTURE_RECTANGLE_NV = 0x84F5;
|
||||
public static final int GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTextureShader
|
||||
public class NVTextureShader
|
||||
{
|
||||
public static final int GL_TEXTURE_SHADER_NV = 0x86DE;
|
||||
public static final int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTextureShader2
|
||||
public class NVTextureShader2
|
||||
{
|
||||
public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF;
|
||||
public static final int GL_HILO_NV = 0x86F4;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVTextureShader3
|
||||
public class NVTextureShader3
|
||||
{
|
||||
public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850;
|
||||
public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851;
|
||||
|
|
|
|||
|
|
@ -39,11 +39,36 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVVertexArrayRange
|
||||
{
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class NVVertexArrayRange {
|
||||
public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D;
|
||||
public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E;
|
||||
public static final int GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F;
|
||||
public static final int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520;
|
||||
public static final int GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521;
|
||||
|
||||
public static void glVertexArrayRangeNV(ByteBuffer pPointer) {
|
||||
nglVertexArrayRangeNV(pPointer.remaining(), pPointer, pPointer.position());
|
||||
}
|
||||
private static native void nglVertexArrayRangeNV(int size, Buffer pPointer, int pPointer_offset);
|
||||
public static native void glFlushVertexArrayRangeNV();
|
||||
|
||||
public static native ByteBuffer glXAllocateMemoryNV(
|
||||
int size,
|
||||
float readFrequency,
|
||||
float writeFrequency,
|
||||
float priority);
|
||||
|
||||
private static native void glXFreeMemoryNV(ByteBuffer pointer);
|
||||
|
||||
// #ifdef _WIN32
|
||||
|
||||
public static native ByteBuffer wglAllocateMemoryNV(
|
||||
int size,
|
||||
float readFrequency,
|
||||
float writeFrequency,
|
||||
float priority);
|
||||
public static native void wglFreeMemoryNV(ByteBuffer pointer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
*/
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVVertexArrayRange2
|
||||
{
|
||||
public class NVVertexArrayRange2 {
|
||||
public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,127 +1,309 @@
|
|||
/*
|
||||
/*
|
||||
* 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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* * 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
|
||||
* * 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
|
||||
* 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
|
||||
* 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 IntelliJ IDEA.
|
||||
* User: nj
|
||||
* Date: 12-08-2002
|
||||
* Time: 15:26:24
|
||||
* To change template for new interface use
|
||||
* Code Style | Class Templates options (Tools | IDE Options).
|
||||
* Created by LWJGL.
|
||||
* User: spasi
|
||||
* Date: 2003-11-28
|
||||
* Time: 18:54:32
|
||||
*/
|
||||
|
||||
package org.lwjgl.opengl.nv;
|
||||
|
||||
public interface NVVertexProgram
|
||||
{
|
||||
public static final int GL_VERTEX_PROGRAM_NV = 0x8620;
|
||||
public static final int GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642;
|
||||
public static final int GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643;
|
||||
public static final int GL_VERTEX_STATE_PROGRAM_NV = 0x8621;
|
||||
public static final int GL_ATTRIB_ARRAY_SIZE_NV = 0x8623;
|
||||
public static final int GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624;
|
||||
public static final int GL_ATTRIB_ARRAY_TYPE_NV = 0x8625;
|
||||
public static final int GL_CURRENT_ATTRIB_NV = 0x8626;
|
||||
public static final int GL_PROGRAM_PARAMETER_NV = 0x8644;
|
||||
public static final int GL_ATTRIB_ARRAY_POINTER_NV = 0x8645;
|
||||
public static final int GL_PROGRAM_TARGET_NV = 0x8646;
|
||||
public static final int GL_PROGRAM_LENGTH_NV = 0x8627;
|
||||
public static final int GL_PROGRAM_RESIDENT_NV = 0x8647;
|
||||
public static final int GL_PROGRAM_STRING_NV = 0x8628;
|
||||
public static final int GL_TRACK_MATRIX_NV = 0x8648;
|
||||
public static final int GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649;
|
||||
public static final int GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E;
|
||||
public static final int GL_MAX_TRACK_MATRICES_NV = 0x862F;
|
||||
public static final int GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640;
|
||||
public static final int GL_CURRENT_MATRIX_NV = 0x8641;
|
||||
public static final int GL_VERTEX_PROGRAM_BINDING_NV = 0x864A;
|
||||
public static final int GL_PROGRAM_ERROR_POSITION_NV = 0x864B;
|
||||
public static final int GL_MODELVIEW_PROJECTION_NV = 0x8629;
|
||||
public static final int GL_MATRIX0_NV = 0x8630;
|
||||
public static final int GL_MATRIX1_NV = 0x8631;
|
||||
public static final int GL_MATRIX2_NV = 0x8632;
|
||||
public static final int GL_MATRIX3_NV = 0x8633;
|
||||
public static final int GL_MATRIX4_NV = 0x8634;
|
||||
public static final int GL_MATRIX5_NV = 0x8635;
|
||||
public static final int GL_MATRIX6_NV = 0x8636;
|
||||
public static final int GL_MATRIX7_NV = 0x8637;
|
||||
public static final int GL_IDENTITY_NV = 0x862A;
|
||||
public static final int GL_INVERSE_NV = 0x862B;
|
||||
public static final int GL_TRANSPOSE_NV = 0x862C;
|
||||
public static final int GL_INVERSE_TRANSPOSE_NV = 0x862D;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY0_NV = 0x8650;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F;
|
||||
import java.nio.*;
|
||||
|
||||
import org.lwjgl.opengl.VBOTracker;
|
||||
import org.lwjgl.opengl.CoreGL11Constants;
|
||||
|
||||
public class NVVertexProgram extends NVProgram {
|
||||
|
||||
/*
|
||||
Accepted by the <cap> parameter of Disable, Enable, and IsEnabled,
|
||||
and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||
and GetDoublev, and by the <target> parameter of BindProgramNV,
|
||||
ExecuteProgramNV, GetProgramParameter[df]vNV, GetTrackMatrixivNV,
|
||||
LoadProgramNV, ProgramParameter[s]4[df][v]NV, and TrackMatrixNV:
|
||||
*/
|
||||
|
||||
public static final int GL_VERTEX_PROGRAM_NV = 0x8620;
|
||||
|
||||
/*
|
||||
Accepted by the <cap> parameter of Disable, Enable, and IsEnabled,
|
||||
and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
|
||||
and GetDoublev:
|
||||
*/
|
||||
public static final int GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642;
|
||||
public static final int GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643;
|
||||
|
||||
/*
|
||||
Accepted by the <target> parameter of ExecuteProgramNV and
|
||||
LoadProgramNV:
|
||||
*/
|
||||
public static final int GL_VERTEX_STATE_PROGRAM_NV = 0x8621;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetVertexAttrib[dfi]vNV:
|
||||
*/
|
||||
public static final int GL_ATTRIB_ARRAY_SIZE_NV = 0x8623;
|
||||
public static final int GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624;
|
||||
public static final int GL_ATTRIB_ARRAY_TYPE_NV = 0x8625;
|
||||
public static final int GL_CURRENT_ATTRIB_NV = 0x8626;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetProgramParameterfvNV
|
||||
and GetProgramParameterdvNV:
|
||||
*/
|
||||
public static final int GL_PROGRAM_PARAMETER_NV = 0x8644;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetVertexAttribPointervNV:
|
||||
*/
|
||||
public static final int GL_ATTRIB_ARRAY_POINTER_NV = 0x8645;
|
||||
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetTrackMatrixivNV:
|
||||
*/
|
||||
public static final int GL_TRACK_MATRIX_NV = 0x8648;
|
||||
public static final int GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649;
|
||||
|
||||
/*
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E;
|
||||
public static final int GL_MAX_TRACK_MATRICES_NV = 0x862F;
|
||||
public static final int GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640;
|
||||
public static final int GL_CURRENT_MATRIX_NV = 0x8641;
|
||||
public static final int GL_VERTEX_PROGRAM_BINDING_NV = 0x864A;
|
||||
|
||||
/*
|
||||
Accepted by the <matrix> parameter of TrackMatrixNV:
|
||||
*/
|
||||
public static final int GL_MODELVIEW_PROJECTION_NV = 0x8629;
|
||||
|
||||
/*
|
||||
Accepted by the <matrix> parameter of TrackMatrixNV and by the
|
||||
<mode> parameter of MatrixMode:
|
||||
*/
|
||||
public static final int GL_MATRIX0_NV = 0x8630;
|
||||
public static final int GL_MATRIX1_NV = 0x8631;
|
||||
public static final int GL_MATRIX2_NV = 0x8632;
|
||||
public static final int GL_MATRIX3_NV = 0x8633;
|
||||
public static final int GL_MATRIX4_NV = 0x8634;
|
||||
public static final int GL_MATRIX5_NV = 0x8635;
|
||||
public static final int GL_MATRIX6_NV = 0x8636;
|
||||
public static final int GL_MATRIX7_NV = 0x8637;
|
||||
|
||||
/*
|
||||
Accepted by the <transform> parameter of TrackMatrixNV:
|
||||
*/
|
||||
public static final int GL_IDENTITY_NV = 0x862A;
|
||||
public static final int GL_INVERSE_NV = 0x862B;
|
||||
public static final int GL_TRANSPOSE_NV = 0x862C;
|
||||
public static final int GL_INVERSE_TRANSPOSE_NV = 0x862D;
|
||||
|
||||
/*
|
||||
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_VERTEX_ATTRIB_ARRAY0_NV = 0x8650;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E;
|
||||
public static final int GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F;
|
||||
|
||||
/*
|
||||
Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv,
|
||||
Map1d and Map1f and by the <cap> parameter of Enable, Disable, and
|
||||
IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E;
|
||||
public static final int GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F;
|
||||
|
||||
/*
|
||||
Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv,
|
||||
Map2d and Map2f and by the <cap> parameter of Enable, Disable, and
|
||||
IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev:
|
||||
*/
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E;
|
||||
public static final int GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F;
|
||||
|
||||
// ---------------------------
|
||||
public static void glExecuteProgramNV(int target, int id, FloatBuffer params) {
|
||||
assert params.remaining() >= 4: "<params> must have 4 floats available.";
|
||||
nglExecuteProgramNV(target, id, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglExecuteProgramNV(int target, int id, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetProgramParameterNV(int target, int index, int parameterName, FloatBuffer params) {
|
||||
assert params.remaining() >= 4: "<params> must have 4 floats available.";
|
||||
nglGetProgramParameterfvNV(target, index, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetProgramParameterfvNV(int target, int index, int parameterName, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetTrackMatrixNV(int target, int address, int parameterName, IntBuffer params) {
|
||||
nglGetTrackMatrixivNV(target, address, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetTrackMatrixivNV(int target, int address, int parameterName, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribNV(int index, int parameterName, FloatBuffer params) {
|
||||
nglGetVertexAttribfvNV(index, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribfvNV(int index, int parameterName, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribNV(int index, int parameterName, IntBuffer params) {
|
||||
nglGetVertexAttribivNV(index, parameterName, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglGetVertexAttribivNV(int index, int parameterName, IntBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native ByteBuffer glGetVertexAttribPointerNV(int index, int parameterName, int size);
|
||||
|
||||
public static native void glProgramParameter4fNV(int target, int index, float x, float y, float z, float w);
|
||||
|
||||
|
||||
// ---------------------------
|
||||
public static void glProgramParameters4NV(int target, int index, int count, FloatBuffer params) {
|
||||
assert params.remaining() >= 4 * count: "<params> must have " + 4 * count + " floats available.";
|
||||
nglProgramParameters4fvNV(target, index, count, params, params.position());
|
||||
}
|
||||
|
||||
private static native void nglProgramParameters4fvNV(int target, int index, int count, FloatBuffer params, int paramsOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glTrackMatrixNV(int target, int address, int matrix, int transform);
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointerNV(int index, int size, int type, int stride, Buffer buffer, int bufferOffset);
|
||||
|
||||
// ---------------------------
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, int bufferOffset) {
|
||||
assert VBOTracker.getVBOArrayStack().getState() != 0: "Cannot use int offsets when VBO is disabled";
|
||||
nglVertexAttribPointerNVVBO(index, size, type, stride, bufferOffset);
|
||||
}
|
||||
|
||||
private static native void nglVertexAttribPointerNVVBO(int index, int size, int type, int stride, int bufferOffset);
|
||||
// ---------------------------
|
||||
|
||||
public static native void glVertexAttrib1sNV(int index, short x);
|
||||
|
||||
public static native void glVertexAttrib1fNV(int index, float x);
|
||||
|
||||
public static native void glVertexAttrib2sNV(int index, short x, short y);
|
||||
|
||||
public static native void glVertexAttrib2fNV(int index, float x, float y);
|
||||
|
||||
public static native void glVertexAttrib3sNV(int index, short x, short y, short z);
|
||||
|
||||
public static native void glVertexAttrib3fNV(int index, float x, float y, float z);
|
||||
|
||||
public static native void glVertexAttrib4sNV(int index, short x, short y, short z, short w);
|
||||
|
||||
public static native void glVertexAttrib4fNV(int index, float x, float y, float z, float w);
|
||||
|
||||
public static native void glVertexAttrib4ubNV(int index, byte x, byte y, byte z, byte w);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.GL;
|
||||
import org.lwjgl.opengl.CoreGL11;
|
||||
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() {
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.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() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
GL.glPushMatrix();
|
||||
GL.glBegin(GL.GL_POLYGON);
|
||||
CoreGL11.glPushMatrix();
|
||||
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
|
||||
{
|
||||
GL.glColor3f(0.0f, 1.0f, 1.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
CoreGL11.glColor3f(0.0f, 1.0f, 1.0f);
|
||||
CoreGL11.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
|
||||
GL.glColor3f(1.0f, 0.0f, 1.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 30.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);
|
||||
|
||||
GL.glColor3f(1.0f, 1.0f, 0.0f);
|
||||
GL.glVertex2f(position.x + 60.0f, position.y + 15.f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 0.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);
|
||||
}
|
||||
GL.glEnd();
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glEnd();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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.GL;
|
||||
import org.lwjgl.opengl.CoreGL11;
|
||||
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() {
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.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() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
GL.glBegin(GL.GL_POLYGON);
|
||||
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
|
||||
{
|
||||
float color = 1.0f;
|
||||
int buttonDown = 0;
|
||||
|
|
@ -180,15 +180,15 @@ public class ControllerTest {
|
|||
System.out.println("Button " + i + " down");
|
||||
}
|
||||
}
|
||||
GL.glColor3f(color, color, color);
|
||||
CoreGL11.glColor3f(color, color, color);
|
||||
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 60.0f, position.y + 15.f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 0.0f);
|
||||
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);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -182,23 +182,23 @@ public class HWCursorTest {
|
|||
*/
|
||||
private void render() {
|
||||
//clear background
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// draw white quad
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(mouse_x, 600 - mouse_y, 0);
|
||||
GL.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
CoreGL11.glTranslatef(mouse_x, 600 - mouse_y, 0);
|
||||
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
CoreGL11.glBegin(CoreGL11.GL_QUADS);
|
||||
{
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glVertex2i(-50, 50);
|
||||
CoreGL11.glVertex2i(-50, -50);
|
||||
CoreGL11.glVertex2i(50, -50);
|
||||
CoreGL11.glVertex2i(50, 50);
|
||||
CoreGL11.glVertex2i(-50, 50);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -327,15 +327,15 @@ public class HWCursorTest {
|
|||
*/
|
||||
private void glInit() {
|
||||
// Go into orthographic projection mode.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, mode.width, mode.height);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, mode.width, mode.height);
|
||||
|
||||
//set clear color to black
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
//sync frame (only works on windows)
|
||||
Window.setVSyncEnabled(true);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ package org.lwjgl.test.input;
|
|||
|
||||
import org.lwjgl.DisplayMode;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL;
|
||||
import org.lwjgl.opengl.CoreGL11;
|
||||
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() {
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.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() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
GL.glBegin(GL.GL_POLYGON);
|
||||
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
|
||||
{
|
||||
float color = 1.0f;
|
||||
int buttonDown = 0;
|
||||
GL.glColor3f(color, color, color);
|
||||
CoreGL11.glColor3f(color, color, color);
|
||||
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 60.0f, position.y + 15.f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 0.0f);
|
||||
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);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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.GL;
|
||||
import org.lwjgl.opengl.CoreGL11;
|
||||
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() {
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.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() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
GL.glBegin(GL.GL_POLYGON);
|
||||
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
|
||||
{
|
||||
float color = 1.0f;
|
||||
int buttonDown = 0;
|
||||
|
|
@ -213,15 +213,15 @@ public class MouseCreationTest {
|
|||
break;
|
||||
}
|
||||
}
|
||||
GL.glColor3f(color, color, color);
|
||||
CoreGL11.glColor3f(color, color, color);
|
||||
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 60.0f, position.y + 15.f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 0.0f);
|
||||
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);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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.GL;
|
||||
import org.lwjgl.opengl.CoreGL11;
|
||||
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() {
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.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() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
GL.glBegin(GL.GL_POLYGON);
|
||||
CoreGL11.glBegin(CoreGL11.GL_POLYGON);
|
||||
{
|
||||
float color = 1.0f;
|
||||
int buttonDown = 0;
|
||||
|
|
@ -167,15 +167,15 @@ public class MouseTest {
|
|||
break;
|
||||
}
|
||||
}
|
||||
GL.glColor3f(color, color, color);
|
||||
CoreGL11.glColor3f(color, color, color);
|
||||
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 0.0f);
|
||||
GL.glVertex2f(position.x + 0.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 30.0f);
|
||||
GL.glVertex2f(position.x + 60.0f, position.y + 15.f);
|
||||
GL.glVertex2f(position.x + 40.0f, position.y + 0.0f);
|
||||
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);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -228,4 +228,4 @@ public class PlayTestMemory extends BasicTest {
|
|||
PlayTestMemory playTestMemory = new PlayTestMemory();
|
||||
playTestMemory.execute(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,14 +122,14 @@ public class PositionTest extends BasicTest {
|
|||
// =====================================================
|
||||
Sys.log("Setting up OpenGL");
|
||||
|
||||
GL.glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluPerspective(50.0, WINDOW_WIDTH / WINDOW_HEIGHT, 0.0, 50.0);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glTranslatef(0.0f, 0.0f, -6.6f);
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
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);
|
||||
glut = this.new GLUT();
|
||||
|
||||
Window.setVSyncEnabled(true);
|
||||
|
|
@ -404,48 +404,48 @@ public class PositionTest extends BasicTest {
|
|||
* Render the scene
|
||||
*/
|
||||
private void render() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT | CoreGL11.GL_DEPTH_BUFFER_BIT);
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glRotatef(20.0f, 1.0f, 1.0f, 0.0f);
|
||||
CoreGL11.glRotatef(20.0f, 1.0f, 1.0f, 0.0f);
|
||||
|
||||
// left
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(leftPosition.get(0), leftPosition.get(1), leftPosition.get(2));
|
||||
GL.glColor3f(1.0f, 0.0f, 0.0f);
|
||||
CoreGL11.glTranslatef(leftPosition.get(0), leftPosition.get(1), leftPosition.get(2));
|
||||
CoreGL11.glColor3f(1.0f, 0.0f, 0.0f);
|
||||
glut.glutWireCube(0.5f);
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
|
||||
// center
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(centerPosition.get(0), centerPosition.get(1), centerPosition.get(2));
|
||||
GL.glColor3f(0.0f, 0.0f, 1.0f);
|
||||
CoreGL11.glTranslatef(centerPosition.get(0), centerPosition.get(1), centerPosition.get(2));
|
||||
CoreGL11.glColor3f(0.0f, 0.0f, 1.0f);
|
||||
glut.glutWireCube(0.5f);
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
|
||||
// right
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(rightPosition.get(0), rightPosition.get(1), rightPosition.get(2));
|
||||
GL.glColor3f(0.0f, 1.0f, 0.0f);
|
||||
CoreGL11.glTranslatef(rightPosition.get(0), rightPosition.get(1), rightPosition.get(2));
|
||||
CoreGL11.glColor3f(0.0f, 1.0f, 0.0f);
|
||||
glut.glutWireCube(0.5f);
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
|
||||
// listener
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(listenerPosition.get(0), listenerPosition.get(1), listenerPosition.get(2));
|
||||
GL.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
CoreGL11.glTranslatef(listenerPosition.get(0), listenerPosition.get(1), listenerPosition.get(2));
|
||||
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
glut.glutSolidCube(0.5f);
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -515,11 +515,11 @@ public class PositionTest extends BasicTest {
|
|||
float v[][] = new float[8][3];
|
||||
|
||||
public void glutWireCube(float size) {
|
||||
drawBox(size, GL.GL_LINE_LOOP);
|
||||
drawBox(size, CoreGL11.GL_LINE_LOOP);
|
||||
}
|
||||
|
||||
public void glutSolidCube(float size) {
|
||||
drawBox(size, GL.GL_QUADS);
|
||||
drawBox(size, CoreGL11.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--) {
|
||||
GL.glBegin(type);
|
||||
GL.glNormal3f(n[i][0], n[i][1], n[i][2]);
|
||||
GL.glVertex3f(v[faces[i][0]][0], v[faces[i][0]][1], v[faces[i][0]][2]);
|
||||
GL.glVertex3f(v[faces[i][1]][0], v[faces[i][1]][1], v[faces[i][1]][2]);
|
||||
GL.glVertex3f(v[faces[i][2]][0], v[faces[i][2]][1], v[faces[i][2]][2]);
|
||||
GL.glVertex3f(v[faces[i][3]][0], v[faces[i][3]][1], v[faces[i][3]][2]);
|
||||
GL.glEnd();
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,24 +168,24 @@ public class FullScreenWindowedTest {
|
|||
|
||||
private void render() {
|
||||
//clear background
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// draw white quad
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(quadPosition.x, quadPosition.y, 0);
|
||||
GL.glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||
GL.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
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);
|
||||
{
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glVertex2i(-50, 50);
|
||||
CoreGL11.glVertex2i(-50, -50);
|
||||
CoreGL11.glVertex2i(50, -50);
|
||||
CoreGL11.glVertex2i(50, 50);
|
||||
CoreGL11.glVertex2i(-50, 50);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -305,15 +305,15 @@ public class FullScreenWindowedTest {
|
|||
*/
|
||||
private void glInit() {
|
||||
// Go into orthographic projection mode.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, mode.width, mode.height);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, mode.width, mode.height);
|
||||
|
||||
//set clear color to black
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
//sync frame (only works on windows)
|
||||
Window.setVSyncEnabled(true);
|
||||
|
|
|
|||
|
|
@ -148,17 +148,17 @@ public final class Game {
|
|||
* All rendering is done in here
|
||||
*/
|
||||
private static void render() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
GL.glPushMatrix();
|
||||
GL.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
|
||||
GL.glRotatef(angle, 0, 0, 1.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glVertex2i(-50, 50);
|
||||
GL.glEnd();
|
||||
GL.glPopMatrix();
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -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.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
ByteBuffer num_tex_units_buf = ByteBuffer.allocateDirect(4);
|
||||
num_tex_units_buf.order(ByteOrder.nativeOrder());
|
||||
GL.glGetInteger(GL.GL_MAX_TEXTURE_UNITS_ARB, num_tex_units_buf.asIntBuffer());
|
||||
CoreGL11.glGetInteger(CoreGL13.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.
|
||||
// GL.wglSwapIntervalEXT(1);
|
||||
// CoreGL11.wglSwapIntervalEXT(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ package org.lwjgl.test.opengl;
|
|||
|
||||
import org.lwjgl.input.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
import org.lwjgl.opengl.nv.*;
|
||||
import org.lwjgl.*;
|
||||
|
||||
import java.io.*;
|
||||
|
|
@ -130,7 +131,7 @@ public class Grass {
|
|||
ByteBuffer byte_buf = ByteBuffer.allocateDirect(4);
|
||||
byte_buf.order(ByteOrder.nativeOrder());
|
||||
System.out.println("Vertex program supported: " + GLCaps.GL_NV_vertex_program);
|
||||
GL.glGenProgramsNV(byte_buf.asIntBuffer());
|
||||
NVVertexProgram.glGenProgramsNV(byte_buf.asIntBuffer());
|
||||
IntBuffer int_buf = byte_buf.asIntBuffer();
|
||||
if (int_buf.get(0) == 0)
|
||||
throw new RuntimeException("Could not allocate new vertex program id!");
|
||||
|
|
@ -142,11 +143,11 @@ public class Grass {
|
|||
program_buf.rewind();
|
||||
program_buf.put(program);
|
||||
program_buf.rewind();
|
||||
GL.glLoadProgramNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glLoadProgramNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
program_handle,
|
||||
program_buf);
|
||||
/*GL.glGetInteger(GL.PROGRAM_ERROR_POSITION_NV, int_buf);
|
||||
/*CoreGL11.glGetInteger(CoreGL11.PROGRAM_ERROR_POSITION_NV, int_buf);
|
||||
System.out.println("error position: " + int_buf.get(0));*/
|
||||
|
||||
genMesh();
|
||||
|
|
@ -159,24 +160,24 @@ public class Grass {
|
|||
light_buf_f.rewind();
|
||||
light_buf_f.put(LightDiffuse);
|
||||
|
||||
GL.glLightfv(
|
||||
GL.GL_LIGHT0,
|
||||
GL.GL_DIFFUSE,
|
||||
CoreGL11.glLightfv(
|
||||
CoreGL11.GL_LIGHT0,
|
||||
CoreGL11.GL_DIFFUSE,
|
||||
light_buf_f);
|
||||
light_buf_f.rewind();
|
||||
light_buf_f.put(LightPosition);
|
||||
GL.glLightfv(
|
||||
GL.GL_LIGHT0,
|
||||
GL.GL_POSITION,
|
||||
CoreGL11.glLightfv(
|
||||
CoreGL11.GL_LIGHT0,
|
||||
CoreGL11.GL_POSITION,
|
||||
light_buf_f);
|
||||
GL.glEnable(GL.GL_LIGHT0);
|
||||
GL.glEnable(GL.GL_LIGHTING);
|
||||
GL.glEnable(GL.GL_DEPTH_TEST);
|
||||
GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL.glEnable(GL.GL_BLEND);
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
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);
|
||||
GLU.gluPerspective(40.0, 1.0, 1.0, 50.0);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
|
||||
GLU.gluLookAt(14.0, 10.0, -16.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
|
|
@ -192,7 +193,7 @@ public class Grass {
|
|||
degree *= (0.5 + myrand());
|
||||
|
||||
ptrAnimate(degree);
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT | CoreGL11.GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
//ptrDraw();
|
||||
|
||||
|
|
@ -238,16 +239,16 @@ public class Grass {
|
|||
fRigid = ((fRigid = myrand()) < 0.2f) ? 0.2f : fRigid;
|
||||
|
||||
if (myrand() < 0.3)
|
||||
GL.glBegin(GL.GL_LINE_STRIP);
|
||||
CoreGL11.glBegin(CoreGL11.GL_LINE_STRIP);
|
||||
else
|
||||
GL.glBegin(GL.GL_QUAD_STRIP);
|
||||
CoreGL11.glBegin(CoreGL11.GL_QUAD_STRIP);
|
||||
|
||||
for (cFaces = 0; cFaces < numFaces; cFaces++) {
|
||||
for (cWidth = frndWidth;
|
||||
cWidth >= -frndWidth;
|
||||
cWidth -= (frndWidth * 2.0f)) {
|
||||
GL.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces);
|
||||
GL.glVertex3f(
|
||||
CoreGL11.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces);
|
||||
CoreGL11.glVertex3f(
|
||||
(float) (((cFaces - 2) * 0.1f)
|
||||
* java.lang.Math.cos(fRotate)
|
||||
+ (cWidth) * java.lang.Math.sin(fRotate)),
|
||||
|
|
@ -258,7 +259,7 @@ public class Grass {
|
|||
}
|
||||
frndWidth -= fDecWidth;
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -266,111 +267,111 @@ public class Grass {
|
|||
float cI, cJ, fArea;
|
||||
|
||||
fArea = 20.0f;
|
||||
mesh = GL.glGenLists(1);
|
||||
GL.glNewList(mesh, GL.GL_COMPILE);
|
||||
mesh = CoreGL11.glGenLists(1);
|
||||
CoreGL11.glNewList(mesh, CoreGL11.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);
|
||||
}
|
||||
}
|
||||
GL.glEndList();
|
||||
CoreGL11.glEndList();
|
||||
}
|
||||
|
||||
private static void grsDraw() {
|
||||
GL.glEnable(GL.GL_VERTEX_PROGRAM_NV);
|
||||
GL.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, program_handle);
|
||||
GL.glTrackMatrixNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
CoreGL11.glEnable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
|
||||
NVVertexProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle);
|
||||
NVVertexProgram.glTrackMatrixNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
0,
|
||||
GL.GL_MODELVIEW_PROJECTION_NV,
|
||||
GL.GL_IDENTITY_NV);
|
||||
NVVertexProgram.GL_MODELVIEW_PROJECTION_NV,
|
||||
NVVertexProgram.GL_IDENTITY_NV);
|
||||
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
4,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
5,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
6,
|
||||
1.763609f,
|
||||
0.496495f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
7,
|
||||
-0.943599f,
|
||||
3.203737f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
8,
|
||||
4.101107f,
|
||||
0.943413f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
9,
|
||||
-1.218603f,
|
||||
6.259399f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
10,
|
||||
7.214299f,
|
||||
1.352961f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
11,
|
||||
-1.540748f,
|
||||
10.080958f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
12,
|
||||
10.880035f,
|
||||
1.759046f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
13,
|
||||
-1.852705f,
|
||||
14.468674f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
14,
|
||||
14.292879f,
|
||||
1.973329f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
15,
|
||||
-1.973387f,
|
||||
18.506531f,
|
||||
0.0f,
|
||||
0.0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
16,
|
||||
(float) (java.lang.Math.sin(aslod.angle)
|
||||
* (aslod.value + aslod.ripple)),
|
||||
|
|
@ -379,54 +380,54 @@ public class Grass {
|
|||
* (aslod.value + aslod.ripple)),
|
||||
0.0f);
|
||||
|
||||
GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 17, 1.7f, 5f, 2f, 0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, 17, 1.7f, 5f, 2f, 0f);
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
18,
|
||||
-0.0187293f,
|
||||
0.074261f,
|
||||
0.2121144f,
|
||||
1.570729f);
|
||||
GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 20, 0f, 0.5f, 1f, 0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, 20, 0f, 0.5f, 1f, 0f);
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
21,
|
||||
0.25f,
|
||||
-9f,
|
||||
0.75f,
|
||||
0.1591549f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
22,
|
||||
24.9808f,
|
||||
-24.9808f,
|
||||
-60.14581f,
|
||||
60.14581f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
23,
|
||||
85.45379f,
|
||||
-85.45379f,
|
||||
-64.93935f,
|
||||
64.93935f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
24,
|
||||
19.73921f,
|
||||
-19.73921f,
|
||||
-1f,
|
||||
1f);
|
||||
GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 25, 0f, 4f, 0f, 0f);
|
||||
GL.glProgramParameter4fNV(
|
||||
GL.GL_VERTEX_PROGRAM_NV,
|
||||
NVVertexProgram.glProgramParameter4fNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, 25, 0f, 4f, 0f, 0f);
|
||||
NVVertexProgram.glProgramParameter4fNV(
|
||||
NVVertexProgram.GL_VERTEX_PROGRAM_NV,
|
||||
19,
|
||||
1f,
|
||||
3.141593f,
|
||||
0.5f,
|
||||
1f);
|
||||
GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 26, 0.7f, 0.4f, 0f, 0f);
|
||||
GL.glCallList(mesh);
|
||||
GL.glDisable(GL.GL_VERTEX_PROGRAM_NV);
|
||||
NVVertexProgram.glProgramParameter4fNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, 26, 0.7f, 0.4f, 0f, 0f);
|
||||
CoreGL11.glCallList(mesh);
|
||||
CoreGL11.glDisable(NVVertexProgram.GL_VERTEX_PROGRAM_NV);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,49 +184,49 @@ public class PbufferTest {
|
|||
pbuffer.makeCurrent();
|
||||
// Pbuffer rendering
|
||||
//clear background
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// draw white quad
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(quadPosition.x, quadPosition.y, 0);
|
||||
GL.glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||
GL.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
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);
|
||||
{
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glVertex2i(-50, 50);
|
||||
CoreGL11.glVertex2i(-50, -50);
|
||||
CoreGL11.glVertex2i(50, -50);
|
||||
CoreGL11.glVertex2i(50, 50);
|
||||
CoreGL11.glVertex2i(-50, 50);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
GL.glCopyTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_COMPRESSED_RGB, 0, 0, 512, 512, 0);
|
||||
CoreGL11.glPopMatrix();
|
||||
CoreGL11.glCopyTexImage2D(CoreGL11.GL_TEXTURE_2D, 0, CoreGL11.GL_RGB, 0, 0, 512, 512, 0);
|
||||
Pbuffer.releaseContext();
|
||||
|
||||
// OpenGL window rendering
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
// draw white quad
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(quadPosition.x, quadPosition.y, 0);
|
||||
GL.glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||
GL.glColor3f(1.0f, 1.0f, 0.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
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);
|
||||
{
|
||||
GL.glTexCoord2f(0f, 0f);
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glTexCoord2f(1f, 0f);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glTexCoord2f(1f, 1f);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glTexCoord2f(0f, 1f);
|
||||
GL.glVertex2i(-50, 50);
|
||||
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);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.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);
|
||||
GL.glBindTexture(GL.GL_TEXTURE_2D, tex_handle);
|
||||
CoreGL11.glBindTexture(CoreGL11.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);
|
||||
GL.glDeleteTextures(buffer);
|
||||
CoreGL11.glDeleteTextures(buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -370,15 +370,15 @@ public class PbufferTest {
|
|||
}
|
||||
|
||||
private void initGLState(int width, int height, float color) {
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, width, height);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, width, height);
|
||||
|
||||
//set clear color to black
|
||||
GL.glClearColor(color, color, color, 0.0f);
|
||||
CoreGL11.glClearColor(color, color, color, 0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -388,17 +388,17 @@ public class PbufferTest {
|
|||
//sync frame (only works on windows)
|
||||
Window.setVSyncEnabled(true);
|
||||
|
||||
GL.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
|
||||
GL.glEnable(GL.GL_TEXTURE_2D);
|
||||
CoreGL11.glTexEnvf(CoreGL11.GL_TEXTURE_ENV, CoreGL11.GL_TEXTURE_ENV_MODE, CoreGL11.GL_REPLACE);
|
||||
CoreGL11.glEnable(CoreGL11.GL_TEXTURE_2D);
|
||||
// Create shared texture
|
||||
IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
GL.glGenTextures(buffer);
|
||||
CoreGL11.glGenTextures(buffer);
|
||||
tex_handle = buffer.get(0);
|
||||
GL.glBindTexture(GL.GL_TEXTURE_2D, tex_handle);
|
||||
GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);
|
||||
GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);
|
||||
GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
|
||||
GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
|
||||
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);
|
||||
initGLState(mode.width, mode.height, 0f);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ package org.lwjgl.test.opengl;
|
|||
|
||||
import org.lwjgl.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
import org.lwjgl.opengl.arb.*;
|
||||
import org.lwjgl.input.*;
|
||||
|
||||
import java.nio.*;
|
||||
|
|
@ -150,18 +151,18 @@ public final class VBOIndexTest {
|
|||
* All rendering is done in here
|
||||
*/
|
||||
private static void render() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
GL.glPushMatrix();
|
||||
GL.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
|
||||
GL.glRotatef(angle, 0, 0, 1.0f);
|
||||
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);
|
||||
|
||||
|
||||
ByteBuffer new_mapped_buffer = GL.glMapBufferARB(GL.GL_ARRAY_BUFFER_ARB, GL.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer);
|
||||
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();
|
||||
mapped_buffer = new_mapped_buffer;
|
||||
|
||||
new_mapped_buffer = GL.glMapBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, GL.GL_WRITE_ONLY_ARB, 4*4, mapped_indices_buffer);
|
||||
new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 4*4, mapped_indices_buffer);
|
||||
if (new_mapped_buffer != mapped_indices_buffer)
|
||||
mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
|
||||
|
|
@ -172,10 +173,11 @@ public final class VBOIndexTest {
|
|||
mapped_indices_int_buffer.rewind();
|
||||
indices.rewind();
|
||||
mapped_indices_int_buffer.put(indices);
|
||||
if (GL.glUnmapBufferARB(GL.GL_ARRAY_BUFFER_ARB) && GL.glUnmapBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB)) {
|
||||
GL.glDrawElements(GL.GL_QUADS, 4, GL.GL_UNSIGNED_INT, 0);
|
||||
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);
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -189,36 +191,32 @@ public final class VBOIndexTest {
|
|||
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
|
||||
System.out.println("Timer resolution: " + Sys.getTimerResolution());
|
||||
// Go into orthographic projection mode.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
if (!GLCaps.GL_ARB_vertex_buffer_object) {
|
||||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
}
|
||||
IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
GL.glGenBuffersARB(int_buffer);
|
||||
ARBVertexBufferObject.glGenBuffersARB(int_buffer);
|
||||
buffer_id = int_buffer.get(0);
|
||||
indices_buffer_id = int_buffer.get(1);
|
||||
GL.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, buffer_id);
|
||||
GL.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id);
|
||||
ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id);
|
||||
ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id);
|
||||
vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
||||
vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50);
|
||||
vertices.rewind();
|
||||
indices = ByteBuffer.allocateDirect(4*4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
indices.put(0).put(1).put(2).put(3);
|
||||
indices.rewind();
|
||||
GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, GL.GL_STREAM_DRAW_ARB);
|
||||
GL.glBufferDataARB(GL.GL_ELEMENT_ARRAY_BUFFER_ARB, 4*4, (ByteBuffer)null, GL.GL_STREAM_DRAW_ARB);
|
||||
GL.glEnableClientState(GL.GL_VERTEX_ARRAY);
|
||||
GL.glVertexPointer(2, GL.GL_FLOAT, 0, 0);
|
||||
GL.glGetInteger(GL.GL_MAX_TEXTURE_UNITS_ARB, int_buffer);
|
||||
System.out.println("Number of texture units: " + int_buffer.get(0));
|
||||
// Fix the refresh rate to the display frequency.
|
||||
// gl.wglSwapIntervalEXT(1);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -228,7 +226,7 @@ public final class VBOIndexTest {
|
|||
IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
int_buffer.put(0, buffer_id);
|
||||
int_buffer.put(1, indices_buffer_id);
|
||||
GL.glDeleteBuffersARB(int_buffer);
|
||||
ARBVertexBufferObject.glDeleteBuffersARB(int_buffer);
|
||||
Keyboard.destroy();
|
||||
Mouse.destroy();
|
||||
Window.destroy();
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ package org.lwjgl.test.opengl;
|
|||
|
||||
import org.lwjgl.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
import org.lwjgl.opengl.arb.*;
|
||||
import org.lwjgl.input.*;
|
||||
|
||||
import java.nio.*;
|
||||
|
|
@ -146,20 +147,20 @@ public final class VBOTest {
|
|||
* All rendering is done in here
|
||||
*/
|
||||
private static void render() {
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
GL.glPushMatrix();
|
||||
GL.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f);
|
||||
GL.glRotatef(angle, 0, 0, 1.0f);
|
||||
ByteBuffer new_mapped_buffer = GL.glMapBufferARB(GL.GL_ARRAY_BUFFER_ARB, GL.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer);
|
||||
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);
|
||||
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();
|
||||
mapped_buffer = new_mapped_buffer;
|
||||
mapped_float_buffer.rewind();
|
||||
vertices.rewind();
|
||||
mapped_float_buffer.put(vertices);
|
||||
if (GL.glUnmapBufferARB(GL.GL_ARRAY_BUFFER_ARB))
|
||||
GL.glDrawArrays(GL.GL_QUADS, 0, 4);
|
||||
GL.glPopMatrix();
|
||||
if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB))
|
||||
CoreGL11.glDrawArrays(CoreGL11.GL_QUADS, 0, 4);
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -173,29 +174,25 @@ public final class VBOTest {
|
|||
Sys.setProcessPriority(Sys.HIGH_PRIORITY);
|
||||
System.out.println("Timer resolution: " + Sys.getTimerResolution());
|
||||
// Go into orthographic projection mode.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight());
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, Display.getWidth(), Display.getHeight());
|
||||
if (!GLCaps.GL_ARB_vertex_buffer_object) {
|
||||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
}
|
||||
IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
GL.glGenBuffersARB(int_buffer);
|
||||
ARBVertexBufferObject.glGenBuffersARB(int_buffer);
|
||||
buffer_id = int_buffer.get(0);
|
||||
GL.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, buffer_id);
|
||||
ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id);
|
||||
vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
||||
vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50);
|
||||
GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, GL.GL_STREAM_DRAW_ARB);
|
||||
GL.glEnableClientState(GL.GL_VERTEX_ARRAY);
|
||||
GL.glVertexPointer(2, GL.GL_FLOAT, 0, 0);
|
||||
GL.glGetInteger(GL.GL_MAX_TEXTURE_UNITS_ARB, int_buffer);
|
||||
System.out.println("Number of texture units: " + int_buffer.get(0));
|
||||
// Fix the refresh rate to the display frequency.
|
||||
// gl.wglSwapIntervalEXT(1);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -204,7 +201,7 @@ public final class VBOTest {
|
|||
private static void cleanup() {
|
||||
IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
int_buffer.put(0, buffer_id);
|
||||
GL.glDeleteBuffersARB(int_buffer);
|
||||
ARBVertexBufferObject.glDeleteBuffersARB(int_buffer);
|
||||
Keyboard.destroy();
|
||||
Mouse.destroy();
|
||||
Window.destroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue