From 53bd9b660ded07afd013ad022a65e884b580816d Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 4 Jul 2004 13:14:06 +0000 Subject: [PATCH] all initNativeStub() methods throws LWJGLException --- src/java/org/lwjgl/openal/AL.java | 6 ++---- src/java/org/lwjgl/openal/AL10.java | 5 ++++- src/java/org/lwjgl/openal/ALC.java | 2 +- src/java/org/lwjgl/opengl/ARBBufferObject.java | 4 +++- src/java/org/lwjgl/opengl/ARBImaging.java | 3 ++- src/java/org/lwjgl/opengl/ARBMatrixPalette.java | 3 ++- src/java/org/lwjgl/opengl/ARBMultisample.java | 4 +++- src/java/org/lwjgl/opengl/ARBMultitexture.java | 4 +++- src/java/org/lwjgl/opengl/ARBOcclusionQuery.java | 4 +++- src/java/org/lwjgl/opengl/ARBPointParameters.java | 4 +++- src/java/org/lwjgl/opengl/ARBProgram.java | 4 +++- src/java/org/lwjgl/opengl/ARBShaderObjects.java | 4 +++- src/java/org/lwjgl/opengl/ARBTextureCompression.java | 4 +++- src/java/org/lwjgl/opengl/ARBTransposeMatrix.java | 4 +++- src/java/org/lwjgl/opengl/ARBVertexBlend.java | 3 ++- src/java/org/lwjgl/opengl/ARBVertexProgram.java | 4 +++- src/java/org/lwjgl/opengl/ARBVertexShader.java | 4 +++- src/java/org/lwjgl/opengl/ARBWindowPos.java | 4 +++- src/java/org/lwjgl/opengl/ATIDrawBuffers.java | 4 +++- src/java/org/lwjgl/opengl/ATIElementArray.java | 3 ++- src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java | 4 +++- src/java/org/lwjgl/opengl/ATIFragmentShader.java | 4 +++- src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java | 4 +++- src/java/org/lwjgl/opengl/ATIPnTriangles.java | 4 +++- src/java/org/lwjgl/opengl/ATISeparateStencil.java | 4 +++- src/java/org/lwjgl/opengl/ATIVertexArrayObject.java | 4 +++- .../org/lwjgl/opengl/ATIVertexAttribArrayObject.java | 4 +++- src/java/org/lwjgl/opengl/ATIVertexStreams.java | 4 +++- .../org/lwjgl/opengl/EXTBlendEquationSeparate.java | 4 +++- src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java | 4 +++- src/java/org/lwjgl/opengl/EXTCompiledVertexArray.java | 4 +++- src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java | 4 +++- src/java/org/lwjgl/opengl/EXTDrawRangeElements.java | 3 ++- src/java/org/lwjgl/opengl/EXTFogCoord.java | 3 ++- src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java | 4 +++- src/java/org/lwjgl/opengl/EXTPointParameters.java | 4 +++- src/java/org/lwjgl/opengl/EXTSecondaryColor.java | 3 ++- src/java/org/lwjgl/opengl/EXTStencilTwoSide.java | 4 +++- src/java/org/lwjgl/opengl/EXTVertexShader.java | 3 ++- src/java/org/lwjgl/opengl/EXTVertexWeighting.java | 3 ++- src/java/org/lwjgl/opengl/GL11.java | 4 +++- src/java/org/lwjgl/opengl/GL12.java | 4 +++- src/java/org/lwjgl/opengl/GL13.java | 4 +++- src/java/org/lwjgl/opengl/GL14.java | 4 +++- src/java/org/lwjgl/opengl/GL15.java | 4 +++- src/java/org/lwjgl/opengl/NVEvaluators.java | 4 +++- src/java/org/lwjgl/opengl/NVFence.java | 4 +++- src/java/org/lwjgl/opengl/NVFragmentProgram.java | 4 +++- src/java/org/lwjgl/opengl/NVHalfFloat.java | 4 +++- src/java/org/lwjgl/opengl/NVOcclusionQuery.java | 4 +++- src/java/org/lwjgl/opengl/NVPixelDataRange.java | 4 +++- src/java/org/lwjgl/opengl/NVPointSprite.java | 4 +++- src/java/org/lwjgl/opengl/NVPrimitiveRestart.java | 4 +++- src/java/org/lwjgl/opengl/NVProgram.java | 4 +++- src/java/org/lwjgl/opengl/NVRegisterCombiners.java | 4 +++- src/java/org/lwjgl/opengl/NVRegisterCombiners2.java | 4 +++- src/java/org/lwjgl/opengl/NVVertexArrayRange.java | 4 +++- src/java/org/lwjgl/opengl/NVVertexProgram.java | 4 +++- src/native/common/common_tools.cpp | 10 +++------- src/native/common/common_tools.h | 2 +- 60 files changed, 167 insertions(+), 69 deletions(-) diff --git a/src/java/org/lwjgl/openal/AL.java b/src/java/org/lwjgl/openal/AL.java index b87e6341..70c9f39f 100644 --- a/src/java/org/lwjgl/openal/AL.java +++ b/src/java/org/lwjgl/openal/AL.java @@ -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(); } /** diff --git a/src/java/org/lwjgl/openal/AL10.java b/src/java/org/lwjgl/openal/AL10.java index 15298532..e2cf353c 100644 --- a/src/java/org/lwjgl/openal/AL10.java +++ b/src/java/org/lwjgl/openal/AL10.java @@ -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$ *
@@ -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 diff --git a/src/java/org/lwjgl/openal/ALC.java b/src/java/org/lwjgl/openal/ALC.java index 67550964..a52388fd 100644 --- a/src/java/org/lwjgl/openal/ALC.java +++ b/src/java/org/lwjgl/openal/ALC.java @@ -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 diff --git a/src/java/org/lwjgl/opengl/ARBBufferObject.java b/src/java/org/lwjgl/opengl/ARBBufferObject.java index 75660249..ebc6ba5e 100644 --- a/src/java/org/lwjgl/opengl/ARBBufferObject.java +++ b/src/java/org/lwjgl/opengl/ARBBufferObject.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ARBImaging.java b/src/java/org/lwjgl/opengl/ARBImaging.java index b9c41d64..d9f7bca1 100644 --- a/src/java/org/lwjgl/opengl/ARBImaging.java +++ b/src/java/org/lwjgl/opengl/ARBImaging.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java index 46a75dab..08e04839 100644 --- a/src/java/org/lwjgl/opengl/ARBMatrixPalette.java +++ b/src/java/org/lwjgl/opengl/ARBMatrixPalette.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ARBMultisample.java b/src/java/org/lwjgl/opengl/ARBMultisample.java index 2400219a..472bce14 100644 --- a/src/java/org/lwjgl/opengl/ARBMultisample.java +++ b/src/java/org/lwjgl/opengl/ARBMultisample.java @@ -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); } diff --git a/src/java/org/lwjgl/opengl/ARBMultitexture.java b/src/java/org/lwjgl/opengl/ARBMultitexture.java index 2b8f6cb3..76df501a 100644 --- a/src/java/org/lwjgl/opengl/ARBMultitexture.java +++ b/src/java/org/lwjgl/opengl/ARBMultitexture.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java b/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java index 6e4f877d..58e89924 100644 --- a/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java +++ b/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ARBPointParameters.java b/src/java/org/lwjgl/opengl/ARBPointParameters.java index e2826425..5451cbcc 100644 --- a/src/java/org/lwjgl/opengl/ARBPointParameters.java +++ b/src/java/org/lwjgl/opengl/ARBPointParameters.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBProgram.java b/src/java/org/lwjgl/opengl/ARBProgram.java index 5653ce29..a0434a26 100644 --- a/src/java/org/lwjgl/opengl/ARBProgram.java +++ b/src/java/org/lwjgl/opengl/ARBProgram.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ARBShaderObjects.java b/src/java/org/lwjgl/opengl/ARBShaderObjects.java index 2e1ef740..b9d97a42 100644 --- a/src/java/org/lwjgl/opengl/ARBShaderObjects.java +++ b/src/java/org/lwjgl/opengl/ARBShaderObjects.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBTextureCompression.java b/src/java/org/lwjgl/opengl/ARBTextureCompression.java index e09f7f2b..49349dd5 100644 --- a/src/java/org/lwjgl/opengl/ARBTextureCompression.java +++ b/src/java/org/lwjgl/opengl/ARBTextureCompression.java @@ -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()); diff --git a/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java b/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java index 902a3f92..30c0bebf 100644 --- a/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java +++ b/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBVertexBlend.java b/src/java/org/lwjgl/opengl/ARBVertexBlend.java index f2f49475..eb61abb9 100644 --- a/src/java/org/lwjgl/opengl/ARBVertexBlend.java +++ b/src/java/org/lwjgl/opengl/ARBVertexBlend.java @@ -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()); diff --git a/src/java/org/lwjgl/opengl/ARBVertexProgram.java b/src/java/org/lwjgl/opengl/ARBVertexProgram.java index dcf69941..f9af1661 100644 --- a/src/java/org/lwjgl/opengl/ARBVertexProgram.java +++ b/src/java/org/lwjgl/opengl/ARBVertexProgram.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ARBVertexShader.java b/src/java/org/lwjgl/opengl/ARBVertexShader.java index 9b70218a..8584acdd 100644 --- a/src/java/org/lwjgl/opengl/ARBVertexShader.java +++ b/src/java/org/lwjgl/opengl/ARBVertexShader.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ARBWindowPos.java b/src/java/org/lwjgl/opengl/ARBWindowPos.java index 707eef59..a0233ef1 100644 --- a/src/java/org/lwjgl/opengl/ARBWindowPos.java +++ b/src/java/org/lwjgl/opengl/ARBWindowPos.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATIDrawBuffers.java b/src/java/org/lwjgl/opengl/ATIDrawBuffers.java index c903ae04..9e62dfd6 100644 --- a/src/java/org/lwjgl/opengl/ATIDrawBuffers.java +++ b/src/java/org/lwjgl/opengl/ATIDrawBuffers.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/ATIElementArray.java b/src/java/org/lwjgl/opengl/ATIElementArray.java index 06c5d338..7c9c0c97 100644 --- a/src/java/org/lwjgl/opengl/ATIElementArray.java +++ b/src/java/org/lwjgl/opengl/ATIElementArray.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java b/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java index 2fdd805a..8df6453f 100644 --- a/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java +++ b/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATIFragmentShader.java b/src/java/org/lwjgl/opengl/ATIFragmentShader.java index 83c473c7..22dc1215 100644 --- a/src/java/org/lwjgl/opengl/ATIFragmentShader.java +++ b/src/java/org/lwjgl/opengl/ATIFragmentShader.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java b/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java index e91fcf7b..3af93052 100644 --- a/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java +++ b/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java @@ -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 diff --git a/src/java/org/lwjgl/opengl/ATIPnTriangles.java b/src/java/org/lwjgl/opengl/ATIPnTriangles.java index 2f9f6fc6..2d59d335 100644 --- a/src/java/org/lwjgl/opengl/ATIPnTriangles.java +++ b/src/java/org/lwjgl/opengl/ATIPnTriangles.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATISeparateStencil.java b/src/java/org/lwjgl/opengl/ATISeparateStencil.java index a1c833d0..8f8b4592 100644 --- a/src/java/org/lwjgl/opengl/ATISeparateStencil.java +++ b/src/java/org/lwjgl/opengl/ATISeparateStencil.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java b/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java index 9caba132..e975bfc7 100644 --- a/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java +++ b/src/java/org/lwjgl/opengl/ATIVertexArrayObject.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java b/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java index b6ff14b5..bad2fca6 100644 --- a/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java +++ b/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java @@ -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, diff --git a/src/java/org/lwjgl/opengl/ATIVertexStreams.java b/src/java/org/lwjgl/opengl/ATIVertexStreams.java index a2911ebc..7fdde423 100644 --- a/src/java/org/lwjgl/opengl/ATIVertexStreams.java +++ b/src/java/org/lwjgl/opengl/ATIVertexStreams.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java b/src/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java index da5a0a82..89ac9033 100644 --- a/src/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java +++ b/src/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java b/src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java index 7bbad650..15f15eb7 100644 --- a/src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java +++ b/src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java @@ -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); } diff --git a/src/java/org/lwjgl/opengl/EXTCompiledVertexArray.java b/src/java/org/lwjgl/opengl/EXTCompiledVertexArray.java index f2db938c..4c8e7c15 100644 --- a/src/java/org/lwjgl/opengl/EXTCompiledVertexArray.java +++ b/src/java/org/lwjgl/opengl/EXTCompiledVertexArray.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java b/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java index 85edc329..780347b3 100644 --- a/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java +++ b/src/java/org/lwjgl/opengl/EXTDepthBoundsTest.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java index ec1bea48..35059abf 100644 --- a/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java +++ b/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/EXTFogCoord.java b/src/java/org/lwjgl/opengl/EXTFogCoord.java index 46405085..030f2624 100644 --- a/src/java/org/lwjgl/opengl/EXTFogCoord.java +++ b/src/java/org/lwjgl/opengl/EXTFogCoord.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java b/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java index 66bd8704..e901b2ea 100644 --- a/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java +++ b/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java @@ -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()) { diff --git a/src/java/org/lwjgl/opengl/EXTPointParameters.java b/src/java/org/lwjgl/opengl/EXTPointParameters.java index 10c43828..1a596a27 100644 --- a/src/java/org/lwjgl/opengl/EXTPointParameters.java +++ b/src/java/org/lwjgl/opengl/EXTPointParameters.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/EXTSecondaryColor.java b/src/java/org/lwjgl/opengl/EXTSecondaryColor.java index 0617250a..bf6f91da 100644 --- a/src/java/org/lwjgl/opengl/EXTSecondaryColor.java +++ b/src/java/org/lwjgl/opengl/EXTSecondaryColor.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/EXTStencilTwoSide.java b/src/java/org/lwjgl/opengl/EXTStencilTwoSide.java index 03fb8a84..a743d054 100644 --- a/src/java/org/lwjgl/opengl/EXTStencilTwoSide.java +++ b/src/java/org/lwjgl/opengl/EXTStencilTwoSide.java @@ -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); } diff --git a/src/java/org/lwjgl/opengl/EXTVertexShader.java b/src/java/org/lwjgl/opengl/EXTVertexShader.java index 518fc66d..d235822a 100644 --- a/src/java/org/lwjgl/opengl/EXTVertexShader.java +++ b/src/java/org/lwjgl/opengl/EXTVertexShader.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/EXTVertexWeighting.java b/src/java/org/lwjgl/opengl/EXTVertexWeighting.java index 84798a13..d3a9cd8f 100644 --- a/src/java/org/lwjgl/opengl/EXTVertexWeighting.java +++ b/src/java/org/lwjgl/opengl/EXTVertexWeighting.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/GL11.java b/src/java/org/lwjgl/opengl/GL11.java index 791645b1..3b578f42 100644 --- a/src/java/org/lwjgl/opengl/GL11.java +++ b/src/java/org/lwjgl/opengl/GL11.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/GL12.java b/src/java/org/lwjgl/opengl/GL12.java index 50af538c..36b71c52 100644 --- a/src/java/org/lwjgl/opengl/GL12.java +++ b/src/java/org/lwjgl/opengl/GL12.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/GL13.java b/src/java/org/lwjgl/opengl/GL13.java index 61d4d94f..b0af6687 100644 --- a/src/java/org/lwjgl/opengl/GL13.java +++ b/src/java/org/lwjgl/opengl/GL13.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/GL14.java b/src/java/org/lwjgl/opengl/GL14.java index fe93fe80..3d11910f 100644 --- a/src/java/org/lwjgl/opengl/GL14.java +++ b/src/java/org/lwjgl/opengl/GL14.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/GL15.java b/src/java/org/lwjgl/opengl/GL15.java index 75aafaa8..b9c6b149 100644 --- a/src/java/org/lwjgl/opengl/GL15.java +++ b/src/java/org/lwjgl/opengl/GL15.java @@ -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 ) { diff --git a/src/java/org/lwjgl/opengl/NVEvaluators.java b/src/java/org/lwjgl/opengl/NVEvaluators.java index cc5a0857..18ec99e7 100644 --- a/src/java/org/lwjgl/opengl/NVEvaluators.java +++ b/src/java/org/lwjgl/opengl/NVEvaluators.java @@ -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 diff --git a/src/java/org/lwjgl/opengl/NVFence.java b/src/java/org/lwjgl/opengl/NVFence.java index 2237e7bb..ab518add 100644 --- a/src/java/org/lwjgl/opengl/NVFence.java +++ b/src/java/org/lwjgl/opengl/NVFence.java @@ -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()); diff --git a/src/java/org/lwjgl/opengl/NVFragmentProgram.java b/src/java/org/lwjgl/opengl/NVFragmentProgram.java index 00ffc7eb..cc4e7d4d 100644 --- a/src/java/org/lwjgl/opengl/NVFragmentProgram.java +++ b/src/java/org/lwjgl/opengl/NVFragmentProgram.java @@ -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; // --------------------------- diff --git a/src/java/org/lwjgl/opengl/NVHalfFloat.java b/src/java/org/lwjgl/opengl/NVHalfFloat.java index 7f6f4ab2..270bdfec 100644 --- a/src/java/org/lwjgl/opengl/NVHalfFloat.java +++ b/src/java/org/lwjgl/opengl/NVHalfFloat.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/NVOcclusionQuery.java b/src/java/org/lwjgl/opengl/NVOcclusionQuery.java index c3790db7..87ea0a90 100644 --- a/src/java/org/lwjgl/opengl/NVOcclusionQuery.java +++ b/src/java/org/lwjgl/opengl/NVOcclusionQuery.java @@ -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()); diff --git a/src/java/org/lwjgl/opengl/NVPixelDataRange.java b/src/java/org/lwjgl/opengl/NVPixelDataRange.java index 2126dd3e..ce2999bf 100644 --- a/src/java/org/lwjgl/opengl/NVPixelDataRange.java +++ b/src/java/org/lwjgl/opengl/NVPixelDataRange.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/NVPointSprite.java b/src/java/org/lwjgl/opengl/NVPointSprite.java index 7952cf00..86b80a2e 100644 --- a/src/java/org/lwjgl/opengl/NVPointSprite.java +++ b/src/java/org/lwjgl/opengl/NVPointSprite.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/NVPrimitiveRestart.java b/src/java/org/lwjgl/opengl/NVPrimitiveRestart.java index 1ae84be5..2627291b 100644 --- a/src/java/org/lwjgl/opengl/NVPrimitiveRestart.java +++ b/src/java/org/lwjgl/opengl/NVPrimitiveRestart.java @@ -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(); diff --git a/src/java/org/lwjgl/opengl/NVProgram.java b/src/java/org/lwjgl/opengl/NVProgram.java index 38296557..053caba7 100644 --- a/src/java/org/lwjgl/opengl/NVProgram.java +++ b/src/java/org/lwjgl/opengl/NVProgram.java @@ -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) { diff --git a/src/java/org/lwjgl/opengl/NVRegisterCombiners.java b/src/java/org/lwjgl/opengl/NVRegisterCombiners.java index a37e4775..ddacf26a 100644 --- a/src/java/org/lwjgl/opengl/NVRegisterCombiners.java +++ b/src/java/org/lwjgl/opengl/NVRegisterCombiners.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java b/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java index 8dfc3031..174b89f9 100644 --- a/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java +++ b/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java @@ -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); diff --git a/src/java/org/lwjgl/opengl/NVVertexArrayRange.java b/src/java/org/lwjgl/opengl/NVVertexArrayRange.java index f048942e..7669de61 100644 --- a/src/java/org/lwjgl/opengl/NVVertexArrayRange.java +++ b/src/java/org/lwjgl/opengl/NVVertexArrayRange.java @@ -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()); diff --git a/src/java/org/lwjgl/opengl/NVVertexProgram.java b/src/java/org/lwjgl/opengl/NVVertexProgram.java index 1d7910a4..21dd9448 100644 --- a/src/java/org/lwjgl/opengl/NVVertexProgram.java +++ b/src/java/org/lwjgl/opengl/NVVertexProgram.java @@ -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; // --------------------------- diff --git a/src/native/common/common_tools.cpp b/src/native/common/common_tools.cpp index cd4a1202..c51e5fca 100644 --- a/src/native/common/common_tools.cpp +++ b/src/native/common/common_tools.cpp @@ -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) { diff --git a/src/native/common/common_tools.h b/src/native/common/common_tools.h index 1b46833d..d6000dd1 100644 --- a/src/native/common/common_tools.h +++ b/src/native/common/common_tools.h @@ -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