all initNativeStub() methods throws LWJGLException

This commit is contained in:
Elias Naur 2004-07-04 13:14:06 +00:00
parent b7e4214a1a
commit 53bd9b660d
60 changed files with 167 additions and 69 deletions

View File

@ -182,9 +182,7 @@ public abstract class AL {
if (contextFrequency == -1) {
context = ALC.alcCreateContext(device.device, null);
} else {
context =
ALC.alcCreateContext(
device.device,
context = ALC.alcCreateContext(device.device,
ALCcontext.createAttributeList(contextFrequency, contextRefresh, contextSynchronized));
}
@ -215,7 +213,7 @@ public abstract class AL {
contextSynchronized = ALC.ALC_FALSE;
created = false;
nDestroy();
nDestroy();
}
/**

View File

@ -36,6 +36,9 @@ import java.nio.ByteBuffer;
import java.nio.ShortBuffer;
import java.nio.IntBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
/**
* $Id$
* <br>
@ -357,7 +360,7 @@ public final class AL10 {
/** Distance model */
public static final int AL_INVERSE_DISTANCE_CLAMPED = 0xD002;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
/**
* The application can temporarily disable certain AL capabilities on a per Context

View File

@ -170,7 +170,7 @@ public class ALC {
created = true;
}
private static native void initNativeStubs();
private static native void initNativeStubs() throws LWJGLException;
/**
* Calls whatever destruction rutines that are needed

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ARBBufferObject {
/*
@ -68,7 +70,7 @@ public final class ARBBufferObject {
public static final int GL_BUFFER_MAPPED_ARB = 0x88BC;
public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88BD;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glBindBufferARB(int target, int buffer) {
switch (target) {

View File

@ -39,6 +39,7 @@ import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLException;
/**
* $Id$
@ -126,7 +127,7 @@ public final class ARBImaging {
public static final int GL_MINMAX_FORMAT = 0x802F;
public static final int GL_MINMAX_SINK = 0x8030;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) {
BufferChecks.checkBuffer(data, 256);

View File

@ -36,6 +36,7 @@ import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ARBMatrixPalette {
public static final int GL_MATRIX_PALETTE_ARB = 0x8840;
@ -49,7 +50,7 @@ public final class ARBMatrixPalette {
public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848;
public static final int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glCurrentPaletteMatrixARB(int index);
public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) {

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBMultisample {
public static final int GL_MULTISAMPLE_ARB = 0x809D;
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E;
@ -42,7 +44,7 @@ public final class ARBMultisample {
public static final int GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB;
public static final int GL_MULTISAMPLE_BIT_ARB = 0x20000000;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glSampleCoverageARB(float value, boolean invert);
}

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBMultitexture {
public static final int GL_TEXTURE0_ARB = 0x84C0;
public static final int GL_TEXTURE1_ARB = 0x84C1;
@ -68,7 +70,7 @@ public final class ARBMultitexture {
public static final int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1;
public static final int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glClientActiveTextureARB(int texture);

View File

@ -33,6 +33,8 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ARBOcclusionQuery {
/*
@ -54,7 +56,7 @@ public final class ARBOcclusionQuery {
public static final int GL_QUERY_RESULT_ARB = 0x8866;
public static final int GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glGenQueriesARB(IntBuffer ids) {

View File

@ -33,13 +33,15 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class ARBPointParameters {
public static final int GL_POINT_SIZE_MIN_ARB = 0x8126;
public static final int GL_POINT_SIZE_MAX_ARB = 0x8127;
public static final int GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128;
public static final int GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glPointParameterfARB(int pname, float param);

View File

@ -38,6 +38,8 @@ import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public class ARBProgram {
/*
@ -129,7 +131,7 @@ public class ARBProgram {
public static final int GL_MATRIX31_ARB = 0x88DF;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glProgramStringARB(int target, int format, ByteBuffer string) {

View File

@ -36,6 +36,8 @@ import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ARBShaderObjects {
/*
@ -90,7 +92,7 @@ public final class ARBShaderObjects {
public static final int GL_SAMPLER_2D_RECT_ARB = 0x8B63;
public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glDeleteObjectARB(int obj);

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ARBTextureCompression
{
public static final int GL_COMPRESSED_ALPHA_ARB = 0x84E9;
@ -51,7 +53,7 @@ public final class ARBTextureCompression
public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2;
public static final int GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
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());

View File

@ -33,13 +33,15 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class ARBTransposeMatrix {
public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3;
public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) {
BufferChecks.checkBuffer(pfMtx, 16);

View File

@ -37,6 +37,7 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ARBVertexBlend {
public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4;
@ -82,7 +83,7 @@ public final class ARBVertexBlend {
public static final int GL_MODELVIEW30_ARB = 0x873E;
public static final int GL_MODELVIEW31_ARB = 0x873F;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glWeightARB(ByteBuffer pWeights) {
nglWeightbvARB(pWeights.remaining(), pWeights, pWeights.position());

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ARBVertexProgram extends ARBProgram {
/*
@ -87,7 +89,7 @@ public final class ARBVertexProgram extends ARBProgram {
*/
public static final int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexAttrib1sARB(int index, short x);

View File

@ -34,6 +34,8 @@ package org.lwjgl.opengl;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ARBVertexShader {
/*
@ -94,7 +96,7 @@ public final class ARBVertexShader {
public static final int GL_FLOAT_MAT3_ARB = 0x8B5B;
public static final int GL_FLOAT_MAT4_ARB = 0x8B5C;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) {

View File

@ -31,8 +31,10 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ARBWindowPos {
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glWindowPos2fARB(float x, float y);

View File

@ -33,6 +33,8 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ATIDrawBuffers {
/*
@ -58,7 +60,7 @@ public final class ATIDrawBuffers {
public static final int GL_DRAW_BUFFER15_ATI = 0x8834;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glDrawBuffersATI(IntBuffer buffers) {

View File

@ -36,13 +36,14 @@ import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ATIElementArray {
public static final int GL_ELEMENT_ARRAY_ATI = 0x8768;
public static final int GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769;
public static final int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glElementPointerATI(ByteBuffer pPointer) {
BufferChecks.ensureArrayVBOdisabled();

View File

@ -34,6 +34,8 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ATIEnvmapBumpmap {
public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775;
public static final int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776;
@ -44,7 +46,7 @@ public final class ATIEnvmapBumpmap {
public static final int GL_BUMP_ENVMAP_ATI = 0x877B;
public static final int GL_BUMP_TARGET_ATI = 0x877C;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glTexBumpParameterATI(int pname, FloatBuffer pfParam) {
BufferChecks.checkBuffer(pfParam);

View File

@ -38,6 +38,8 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class ATIFragmentShader {
public static final int GL_FRAGMENT_SHADER_ATI = 0x8920;
public static final int GL_REG_0_ATI = 0x8921;
@ -144,7 +146,7 @@ public final class ATIFragmentShader {
public static final int GL_NEGATE_BIT_ATI = 0x00000004;
public static final int GL_BIAS_BIT_ATI = 0x00000008;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native int glGenFragmentShadersATI(int range);

View File

@ -33,9 +33,11 @@ package org.lwjgl.opengl;
import java.nio.ByteBuffer;
import org.lwjgl.LWJGLException;
public final class ATIMapObjectBuffer {
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
/**
* glMapObjectBufferATI maps a gl object buffer to a ByteBuffer. The oldBuffer argument can be

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATIPnTriangles {
public static final int GL_PN_TRIANGLES_ATI = 0x87F0;
public static final int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1;
@ -42,7 +44,7 @@ public final class ATIPnTriangles {
public static final int GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7;
public static final int GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glPNTrianglesfATI(int pname, float param);

View File

@ -31,13 +31,15 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATISeparateStencil {
public static final int GL_STENCIL_BACK_FUNC_ATI = 0x8800;
public static final int GL_STENCIL_BACK_FAIL_ATI = 0x8801;
public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802;
public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass);
public static native void glStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask);

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class ATIVertexArrayObject {
public static final int GL_STATIC_ATI = 0x8760;
public static final int GL_DYNAMIC_ATI = 0x8761;
@ -47,7 +49,7 @@ public final class ATIVertexArrayObject {
public static final int GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766;
public static final int GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static int glNewObjectBufferATI(int size, ByteBuffer pPointer, int usage) {
return nglNewObjectBufferATI(size, pPointer, pPointer != null ? pPointer.position() : 0, usage);

View File

@ -34,9 +34,11 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class ATIVertexAttribArrayObject {
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexAttribArrayObjectATI(int index, int size, int type,
boolean normalized, int stride, int buffer,

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class ATIVertexStreams {
public static final int GL_MAX_VERTEX_STREAMS_ATI = 0x876B;
public static final int GL_VERTEX_SOURCE_ATI = 0x876C;
@ -43,7 +45,7 @@ public final class ATIVertexStreams {
public static final int GL_VERTEX_STREAM6_ATI = 0x8773;
public static final int GL_VERTEX_STREAM7_ATI = 0x8774;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexStream1fATI(int stream, float x);
public static native void glVertexStream1iATI(int stream, int x);

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTBlendEquationSeparate {
/*
@ -40,7 +42,7 @@ public final class EXTBlendEquationSeparate {
public static final int GL_BLEND_EQUATION_RGB_EXT = 0x8009;
public static final int GL_BLEND_EQUATION_ALPHA_EXT = 0x883D;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha);

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
/**
* Insert the type's description here.
* Creation date: (29/06/2000 00:45:10)
@ -41,7 +43,7 @@ public final class EXTBlendFuncSeparate {
public static final int GL_BLEND_DST_ALPHA_EXT = 0x80CA;
public static final int GL_BLEND_SRC_ALPHA_EXT = 0x80CB;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha);
}

View File

@ -31,11 +31,13 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTCompiledVertexArray {
public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8;
public static final int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glLockArraysEXT(int first, int count);
public static native void glUnlockArraysEXT();

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTDepthBoundsTest {
/*
@ -46,7 +48,7 @@ public final class EXTDepthBoundsTest {
*/
public static final int DEPTH_BOUNDS_EXT = 0x8891;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glDepthBoundsEXT(float zmin, float zmax);

View File

@ -36,12 +36,13 @@ import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class EXTDrawRangeElements {
public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8;
public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) {
BufferChecks.ensureElementVBOdisabled();

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import java.nio.Buffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class EXTFogCoord {
public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450;
@ -46,7 +47,7 @@ public final class EXTFogCoord {
public static final int GL_FOG_COORDINATE_ARRAY_EXT = 0x8457;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glFogCoordfEXT(float coord);
public static void glFogCoordPointerEXT(int stride, FloatBuffer data) {

View File

@ -33,8 +33,10 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class EXTMultiDrawArrays {
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) {
if (piFirst.remaining() != piCount.remaining()) {

View File

@ -33,13 +33,15 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class EXTPointParameters {
public static final int GL_POINT_SIZE_MIN_EXT = 0x8126;
public static final int GL_POINT_SIZE_MAX_EXT = 0x8127;
public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128;
public static final int GL_DISTANCE_ATTENUATION_EXT = 0x8129;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glPointParameterfEXT(int pname, float param);

View File

@ -35,6 +35,7 @@ import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class EXTSecondaryColor {
public static final int GL_COLOR_SUM_EXT = 0x8458;
@ -45,7 +46,7 @@ public final class EXTSecondaryColor {
public static final int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D;
public static final int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glSecondaryColor3bEXT(byte red, byte green, byte blue);

View File

@ -31,11 +31,13 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class EXTStencilTwoSide {
public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910;
public static final int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glActiveStencilFaceEXT(int face);
}

View File

@ -37,6 +37,7 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class EXTVertexShader {
public static final int GL_VERTEX_SHADER_EXT = 0x8780;
@ -150,7 +151,7 @@ public final class EXTVertexShader {
public static final int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC;
public static final int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glBeginVertexShaderEXT();
public static native void glEndVertexShaderEXT();

View File

@ -34,6 +34,7 @@ package org.lwjgl.opengl;
import java.nio.Buffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class EXTVertexWeighting {
public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; /* alias to MODELVIEW_STACK_DEPTH */
@ -50,7 +51,7 @@ public final class EXTVertexWeighting {
public static final int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F;
public static final int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glVertexWeightfEXT(float weight);

View File

@ -40,6 +40,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
/**
* $Id$
*
@ -720,7 +722,7 @@ public final class GL11 {
public static final int GL_LOGIC_OP = GL_INDEX_LOGIC_OP;
public static final int GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glAccum(int op, float value);
public static native void glAlphaFunc(int func, float ref);

View File

@ -38,6 +38,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
/**
* $Id$
*
@ -89,7 +91,7 @@ public final class GL12 {
public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) {
BufferChecks.ensureElementVBOdisabled();

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
/**
* $Id$
*
@ -148,7 +150,7 @@ public final class GL13 {
public static final int GL_DOT3_RGBA = 0x86AF;
public static final int GL_CLAMP_TO_BORDER = 0x812D;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glActiveTexture(int texture);
public static native void glClientActiveTexture(int texture);

View File

@ -36,6 +36,8 @@ import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
/**
* $Id$
*
@ -85,7 +87,7 @@ public final class GL14 {
public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD;
public static final int GL_GL_MIRRORED_REPEAT = 0x8370;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glBlendEquation(int mode);
public static native void glBlendColor(float red, float green, float blue, float alpha);

View File

@ -33,6 +33,8 @@ package org.lwjgl.opengl;
import java.nio.*;
import org.lwjgl.LWJGLException;
public final class GL15 {
// ----------------------------------------------------------------------
@ -71,7 +73,7 @@ public final class GL15 {
public static final int GL_BUFFER_MAPPED = 0x88BC;
public static final int GL_BUFFER_MAP_POINTER = 0x88BD;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glBindBuffer(int target, int buffer) {
switch ( target ) {

View File

@ -35,6 +35,8 @@ import java.nio.Buffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class NVEvaluators {
public static final int GL_EVAL_2D_NV = 0x86C0;
public static final int GL_EVAL_TRIANGULAR_2D_NV = 0x86C1;
@ -61,7 +63,7 @@ public final class NVEvaluators {
public static final int GL_MAX_MAP_TESSELLATION_NV = 0x86D6;
public static final int GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, FloatBuffer pPoints) {
// TODO:Check buffer size

View File

@ -33,12 +33,14 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class NVFence {
public static final int GL_ALL_COMPLETED_NV = 0x84F2;
public static final int GL_FENCE_STATUS_NV = 0x84F3;
public static final int GL_FENCE_CONDITION_NV = 0x84F4;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glGenFencesNV(IntBuffer piFences) {
nglGenFencesNV(piFences.remaining(), piFences, piFences.position());

View File

@ -34,6 +34,8 @@ package org.lwjgl.opengl;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class NVFragmentProgram extends NVProgram {
/*
@ -55,7 +57,7 @@ public final class NVFragmentProgram extends NVProgram {
public static final int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873;
public static final int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------

View File

@ -33,6 +33,8 @@ package org.lwjgl.opengl;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class NVHalfFloat {
/*
@ -44,7 +46,7 @@ public final class NVHalfFloat {
*/
public static final int GL_HALF_FLOAT_NV = 0x140B;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glVertex2hNV(short x, short y);

View File

@ -33,6 +33,8 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class NVOcclusionQuery {
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
@ -42,7 +44,7 @@ public final class NVOcclusionQuery {
public static final int GL_PIXEL_COUNT_NV = 0x8866;
public static final int GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glGenOcclusionQueriesNV(IntBuffer piIDs) {
nglGenOcclusionQueriesNV(piIDs.remaining(), piIDs, piIDs.position());

View File

@ -37,6 +37,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class NVPixelDataRange {
/*
@ -60,7 +62,7 @@ public final class NVPixelDataRange {
public static final int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C;
public static final int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glPixelDataRangeNV(int target, ByteBuffer data) {

View File

@ -33,12 +33,14 @@ package org.lwjgl.opengl;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class NVPointSprite {
public static final int GL_POINT_SPRITE_NV = 0x8861;
public static final int GL_COORD_REPLACE_NV = 0x8862;
public static final int GL_POINT_SPRITE_R_MODE_NV = 0x8863;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glPointParameteriNV(int pname, int param);

View File

@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
public final class NVPrimitiveRestart {
/*
@ -47,7 +49,7 @@ public final class NVPrimitiveRestart {
*/
public static final int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glPrimitiveRestartNV();

View File

@ -35,6 +35,8 @@ import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public class NVProgram {
/*
@ -60,7 +62,7 @@ public class NVProgram {
*/
public static final int GL_PROGRAM_ERROR_STRING_NV = 0x8874;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------
public static void glLoadProgramNV(int target, int programID, ByteBuffer string) {

View File

@ -34,6 +34,8 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import org.lwjgl.LWJGLException;
public final class NVRegisterCombiners {
public static final int GL_REGISTER_COMBINERS_NV = 0x8522;
public static final int GL_COMBINER0_NV = 0x8550;
@ -87,7 +89,7 @@ public final class NVRegisterCombiners {
public static final int GL_COLOR_SUM_CLAMP_NV = 0x854F;
public static final int GL_MAX_GENERAL_COMBINERS_NV = 0x854D;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static native void glCombinerParameterfNV(int pname, float param);

View File

@ -33,11 +33,13 @@ package org.lwjgl.opengl;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
public final class NVRegisterCombiners2
{
public static final int GL_PER_STAGE_CONSTANTS_NV = 0x8535;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glCombinerStageParameterNV(int stage, int pname, FloatBuffer pfParams) {
BufferChecks.checkBuffer(pfParams);

View File

@ -34,6 +34,8 @@ package org.lwjgl.opengl;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import org.lwjgl.LWJGLException;
public final class NVVertexArrayRange {
public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D;
public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E;
@ -41,7 +43,7 @@ public final class NVVertexArrayRange {
public static final int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520;
public static final int GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
public static void glVertexArrayRangeNV(ByteBuffer pPointer) {
nglVertexArrayRangeNV(pPointer.remaining(), pPointer, pPointer.position());

View File

@ -38,6 +38,8 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import java.nio.ShortBuffer;
import org.lwjgl.LWJGLException;
public final class NVVertexProgram extends NVProgram {
/*
@ -271,7 +273,7 @@ public final class NVVertexProgram extends NVProgram {
public static final int GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F;
static native void initNativeStubs();
static native void initNativeStubs() throws LWJGLException;
// ---------------------------

View File

@ -153,10 +153,10 @@ bool ext_InitializeFunctions(ExtGetProcAddressPROC gpa, int num_functions, ExtFu
return true;
}
bool ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions) {
void ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions) {
if (clazz == NULL) {
throwException(env, "Null class");
return false;
return;
}
JNINativeMethod *methods = (JNINativeMethod *)malloc(num_functions*sizeof(JNINativeMethod));
for (int i = 0; i < num_functions; i++) {
@ -166,7 +166,7 @@ bool ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, i
if (ext_func_pointer == NULL) {
free(methods);
throwException(env, "Missing driver symbols");
return false;
return;
}
void **ext_function_pointer_pointer = function->ext_function_pointer;
*ext_function_pointer_pointer = ext_func_pointer;
@ -178,10 +178,6 @@ bool ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, i
}
jint result = env->RegisterNatives(clazz, methods, num_functions);
free(methods);
if (result != 0) {
return false;
} else
return true;
}
bool getBooleanProperty(JNIEnv *env, const char* propertyName) {

View File

@ -114,7 +114,7 @@ typedef struct {
#define NUMFUNCTIONS(x) (sizeof(x)/sizeof(JavaMethodAndExtFunction));
extern bool ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions);
extern void ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions);
extern bool ext_InitializeFunctions(ExtGetProcAddressPROC gpa, int num_functions, ExtFunction *functions);
#endif