Don't emit initNativeStub() when generating context-specific OpenGL java classes

This commit is contained in:
Elias Naur 2005-04-04 11:19:18 +00:00
parent b59e82fd83
commit fecbafc097
62 changed files with 3 additions and 63 deletions

View file

@ -25,7 +25,6 @@ public class ARBBufferObject {
public static final int GL_STREAM_READ_ARB = 0x88e1;
public static final int GL_STREAM_DRAW_ARB = 0x88e0;
static native void initNativeStubs() throws LWJGLException;
public static java.nio.ByteBuffer glGetBufferPointerARB(int target, int pname, int result_size) {
long function_pointer = GLContext.getCapabilities().ARB_buffer_object_glGetBufferPointervARB_pointer;

View file

@ -16,7 +16,6 @@ public final class ARBColorBufferFloat {
private ARBColorBufferFloat() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glClampColorARB(int target, int clamp) {
long function_pointer = GLContext.getCapabilities().ARB_color_buffer_float_glClampColorARB_pointer;

View file

@ -28,7 +28,6 @@ public final class ARBDrawBuffers {
private ARBDrawBuffers() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glDrawBuffersARB(IntBuffer buffers) {
long function_pointer = GLContext.getCapabilities().ARB_draw_buffers_glDrawBuffersARB_pointer;

View file

@ -86,7 +86,6 @@ public final class ARBImaging {
private ARBImaging() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) {
long function_pointer = GLContext.getCapabilities().ARB_imaging_glGetSeparableFilter_pointer;

View file

@ -21,7 +21,6 @@ public final class ARBMatrixPalette {
private ARBMatrixPalette() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glMatrixIndexuARB(IntBuffer pIndices) {
long function_pointer = GLContext.getCapabilities().ARB_matrix_palette_glMatrixIndexuivARB_pointer;

View file

@ -20,7 +20,6 @@ public final class ARBMultisample {
private ARBMultisample() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glSampleCoverageARB(float value, boolean invert) {
long function_pointer = GLContext.getCapabilities().ARB_multisample_glSampleCoverageARB_pointer;

View file

@ -46,7 +46,6 @@ public final class ARBMultitexture {
private ARBMultitexture() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glMultiTexCoord4sARB(int target, short s, short t, short r, short q) {
long function_pointer = GLContext.getCapabilities().ARB_multitexture_glMultiTexCoord4sARB_pointer;

View file

@ -16,7 +16,6 @@ public final class ARBOcclusionQuery {
private ARBOcclusionQuery() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetQueryObjectuARB(int id, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().ARB_occlusion_query_glGetQueryObjectuivARB_pointer;

View file

@ -15,7 +15,6 @@ public final class ARBPointParameters {
private ARBPointParameters() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterARB(int pname, FloatBuffer pfParams) {
long function_pointer = GLContext.getCapabilities().ARB_point_parameters_glPointParameterfvARB_pointer;

View file

@ -71,7 +71,6 @@ public class ARBProgram {
public static final int GL_PROGRAM_LENGTH_ARB = 0x8627;
public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875;
static native void initNativeStubs() throws LWJGLException;
public static boolean glIsProgramARB(int program) {
long function_pointer = GLContext.getCapabilities().ARB_program_glIsProgramARB_pointer;

View file

@ -47,7 +47,6 @@ public final class ARBShaderObjects {
private ARBShaderObjects() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetShaderSourceARB(int obj, IntBuffer length, ByteBuffer source) {
long function_pointer = GLContext.getCapabilities().ARB_shader_objects_glGetShaderSourceARB_pointer;

View file

@ -22,7 +22,6 @@ public final class ARBTextureCompression {
private ARBTextureCompression() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
long function_pointer = GLContext.getCapabilities().ARB_texture_compression_glGetCompressedTexImageARB_pointer;

View file

@ -15,7 +15,6 @@ public final class ARBTransposeMatrix {
private ARBTransposeMatrix() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glMultTransposeMatrixARB(FloatBuffer pfMtx) {
long function_pointer = GLContext.getCapabilities().ARB_transpose_matrix_glMultTransposeMatrixfARB_pointer;

View file

@ -53,7 +53,6 @@ public final class ARBVertexBlend {
private ARBVertexBlend() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glVertexBlendARB(int count) {
long function_pointer = GLContext.getCapabilities().ARB_vertex_blend_glVertexBlendARB_pointer;

View file

@ -27,7 +27,6 @@ public final class ARBVertexProgram extends ARBProgram {
private ARBVertexProgram() {
}
static native void initNativeStubs() throws LWJGLException;
public static java.nio.ByteBuffer glGetVertexAttribPointerARB(int index, int pname, int result_size) {
long function_pointer = GLContext.getCapabilities().ARB_vertex_program_glGetVertexAttribPointervARB_pointer;

View file

@ -37,7 +37,6 @@ public final class ARBVertexShader {
private ARBVertexShader() {
}
static native void initNativeStubs() throws LWJGLException;
public static int glGetAttribLocationARB(int programObj, ByteBuffer name) {
long function_pointer = GLContext.getCapabilities().ARB_vertex_shader_glGetAttribLocationARB_pointer;

View file

@ -11,7 +11,6 @@ public final class ARBWindowPos {
private ARBWindowPos() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glWindowPos3sARB(short x, short y, short z) {
long function_pointer = GLContext.getCapabilities().ARB_window_pos_glWindowPos3sARB_pointer;

View file

@ -28,7 +28,6 @@ public final class ATIDrawBuffers {
private ATIDrawBuffers() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glDrawBuffersATI(IntBuffer buffers) {
long function_pointer = GLContext.getCapabilities().ATI_draw_buffers_glDrawBuffersATI_pointer;

View file

@ -14,7 +14,6 @@ public final class ATIElementArray {
private ATIElementArray() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glDrawRangeElementArrayATI(int mode, int start, int end, int count) {
long function_pointer = GLContext.getCapabilities().ATI_element_array_glDrawRangeElementArrayATI_pointer;

View file

@ -19,7 +19,6 @@ public final class ATIEnvmapBumpmap {
private ATIEnvmapBumpmap() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetTexBumpParameterATI(int pname, IntBuffer param) {
long function_pointer = GLContext.getCapabilities().ATI_envmap_bumpmap_glGetTexBumpParameterivATI_pointer;

View file

@ -115,7 +115,6 @@ public final class ATIFragmentShader {
private ATIFragmentShader() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue) {
long function_pointer = GLContext.getCapabilities().ATI_fragment_shader_glSetFragmentShaderConstantATI_pointer;

View file

@ -11,7 +11,6 @@ public final class ATIMapObjectBuffer {
private ATIMapObjectBuffer() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glUnmapObjectBufferATI(int buffer) {
long function_pointer = GLContext.getCapabilities().ATI_map_object_buffer_glUnmapObjectBufferATI_pointer;

View file

@ -20,7 +20,6 @@ public final class ATIPnTriangles {
private ATIPnTriangles() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glPNTrianglesiATI(int pname, int param) {
long function_pointer = GLContext.getCapabilities().ATI_pn_triangles_glPNTrianglesiATI_pointer;

View file

@ -15,7 +15,6 @@ public final class ATISeparateStencil {
private ATISeparateStencil() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask) {
long function_pointer = GLContext.getCapabilities().ATI_separate_stencil_glStencilFuncSeparateATI_pointer;

View file

@ -19,7 +19,6 @@ public final class ATIVertexArrayObject {
private ATIVertexArrayObject() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetVariantArrayObjectATI(int id, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().ATI_vertex_array_object_glGetVariantArrayObjectivATI_pointer;

View file

@ -11,7 +11,6 @@ public final class ATIVertexAttribArrayObject {
private ATIVertexAttribArrayObject() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetVertexAttribArrayObjectATI(int index, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().ATI_vertex_attrib_array_object_glGetVertexAttribArrayObjectivATI_pointer;

View file

@ -21,7 +21,6 @@ public final class ATIVertexStreams {
private ATIVertexStreams() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glVertexBlendEnviATI(int pname, int param) {
long function_pointer = GLContext.getCapabilities().ATI_vertex_streams_glVertexBlendEnviATI_pointer;

View file

@ -13,7 +13,6 @@ public final class EXTBlendEquationSeparate {
private EXTBlendEquationSeparate() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha) {
long function_pointer = GLContext.getCapabilities().EXT_blend_equation_separate_glBlendEquationSeparateEXT_pointer;

View file

@ -15,7 +15,6 @@ public final class EXTBlendFuncSeparate {
private EXTBlendFuncSeparate() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) {
long function_pointer = GLContext.getCapabilities().EXT_blend_func_separate_glBlendFuncSeparateEXT_pointer;

View file

@ -13,7 +13,6 @@ public final class EXTCompiledVertexArray {
private EXTCompiledVertexArray() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glUnlockArraysEXT() {
long function_pointer = GLContext.getCapabilities().EXT_compiled_vertex_array_glUnlockArraysEXT_pointer;

View file

@ -13,7 +13,6 @@ public final class EXTDepthBoundsTest {
private EXTDepthBoundsTest() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glDepthBoundsEXT(double zmin, double zmax) {
long function_pointer = GLContext.getCapabilities().EXT_depth_bounds_test_glDepthBoundsEXT_pointer;

View file

@ -13,7 +13,6 @@ public final class EXTDrawRangeElements {
private EXTDrawRangeElements() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) {
long function_pointer = GLContext.getCapabilities().EXT_draw_range_elements_glDrawRangeElementsEXT_pointer;

View file

@ -19,7 +19,6 @@ public final class EXTFogCoord {
private EXTFogCoord() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glFogCoordPointerEXT(int stride, FloatBuffer data) {
long function_pointer = GLContext.getCapabilities().EXT_fog_coord_glFogCoordPointerEXT_pointer;

View file

@ -68,7 +68,6 @@ public final class EXTFramebufferObject {
private EXTFramebufferObject() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGenerateMipmapEXT(int target) {
long function_pointer = GLContext.getCapabilities().EXT_framebuffer_object_glGenerateMipmapEXT_pointer;

View file

@ -11,7 +11,6 @@ public final class EXTMultiDrawArrays {
private EXTMultiDrawArrays() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) {
if (piFirst.remaining() != piCount.remaining()) {

View file

@ -26,7 +26,6 @@ public final class EXTPalettedTexture {
private EXTPalettedTexture() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetColorTableParameterEXT(int target, int pname, FloatBuffer params) {
long function_pointer = GLContext.getCapabilities().EXT_paletted_texture_glGetColorTableParameterfvEXT_pointer;

View file

@ -15,7 +15,6 @@ public final class EXTPointParameters {
private EXTPointParameters() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterEXT(int pname, FloatBuffer pfParams) {
long function_pointer = GLContext.getCapabilities().EXT_point_parameters_glPointParameterfvEXT_pointer;

View file

@ -18,7 +18,6 @@ public final class EXTSecondaryColor {
private EXTSecondaryColor() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) {
long function_pointer = GLContext.getCapabilities().EXT_secondary_color_glSecondaryColorPointerEXT_pointer;

View file

@ -13,7 +13,6 @@ public final class EXTStencilTwoSide {
private EXTStencilTwoSide() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glActiveStencilFaceEXT(int face) {
long function_pointer = GLContext.getCapabilities().EXT_stencil_two_side_glActiveStencilFaceEXT_pointer;

View file

@ -121,7 +121,6 @@ public final class EXTVertexShader {
private EXTVertexShader() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pbData) {
long function_pointer = GLContext.getCapabilities().EXT_vertex_shader_glGetLocalConstantFloatvEXT_pointer;

View file

@ -24,7 +24,6 @@ public final class EXTVertexWeighting {
private EXTVertexWeighting() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glVertexWeightPointerEXT(int size, int stride, FloatBuffer pPointer) {
long function_pointer = GLContext.getCapabilities().EXT_vertex_weighting_glVertexWeightPointerEXT_pointer;

View file

@ -543,7 +543,6 @@ public final class GL11 {
private GL11() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glViewport(int x, int y, int width, int height) {
long function_pointer = GLContext.getCapabilities().GL11_glViewport_pointer;

View file

@ -48,7 +48,6 @@ public final class GL12 {
private GL12() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) {
long function_pointer = GLContext.getCapabilities().GL12_glCopyTexSubImage3D_pointer;

View file

@ -107,7 +107,6 @@ public final class GL13 {
private GL13() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glSampleCoverage(float value, boolean invert) {
long function_pointer = GLContext.getCapabilities().GL13_glSampleCoverage_pointer;

View file

@ -50,7 +50,6 @@ public final class GL14 {
private GL14() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glWindowPos3i(int x, int y, int z) {
long function_pointer = GLContext.getCapabilities().GL14_glWindowPos3i_pointer;

View file

@ -47,7 +47,6 @@ public final class GL15 {
private GL15() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetQueryObjectu(int id, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().GL15_glGetQueryObjectuiv_pointer;

View file

@ -96,7 +96,6 @@ public final class GL20 {
private GL20() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glBlendEquationSeparate(int modeRGB, int modeAlpha) {
long function_pointer = GLContext.getCapabilities().GL20_glBlendEquationSeparate_pointer;

View file

@ -35,7 +35,6 @@ public final class NVEvaluators {
private NVEvaluators() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glEvalMapsNV(int target, int mode) {
long function_pointer = GLContext.getCapabilities().NV_evaluators_glEvalMapsNV_pointer;

View file

@ -14,7 +14,6 @@ public final class NVFence {
private NVFence() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetFenceivNV(int fence, int pname, IntBuffer piParams) {
long function_pointer = GLContext.getCapabilities().NV_fence_glGetFenceivNV_pointer;

View file

@ -16,7 +16,6 @@ public final class NVFragmentProgram extends NVProgram {
private NVFragmentProgram() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) {
long function_pointer = GLContext.getCapabilities().NV_fragment_program_glGetProgramNamedParameterfvNV_pointer;

View file

@ -12,7 +12,6 @@ public final class NVHalfFloat {
private NVHalfFloat() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glVertexAttribs4NV(int index, ShortBuffer attribs) {
long function_pointer = GLContext.getCapabilities().NV_half_float_glVertexAttribs4hvNV_pointer;

View file

@ -17,7 +17,6 @@ public final class NVOcclusionQuery {
private NVOcclusionQuery() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetOcclusionQueryNV(int id, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().NV_occlusion_query_glGetOcclusionQueryivNV_pointer;

View file

@ -17,7 +17,6 @@ public final class NVPixelDataRange {
private NVPixelDataRange() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glFlushPixelDataRangeNV(int target) {
long function_pointer = GLContext.getCapabilities().NV_pixel_data_range_glFlushPixelDataRangeNV_pointer;

View file

@ -14,7 +14,6 @@ public final class NVPointSprite {
private NVPointSprite() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glPointParameterNV(int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().NV_point_sprite_glPointParameterivNV_pointer;

View file

@ -13,7 +13,6 @@ public final class NVPrimitiveRestart {
private NVPrimitiveRestart() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glPrimitiveRestartIndexNV(int index) {
long function_pointer = GLContext.getCapabilities().NV_primitive_restart_glPrimitiveRestartIndexNV_pointer;

View file

@ -14,7 +14,6 @@ public class NVProgram {
public static final int GL_PROGRAM_LENGTH_NV = 0x8627;
public static final int GL_PROGRAM_TARGET_NV = 0x8646;
static native void initNativeStubs() throws LWJGLException;
public static void glRequestResidentProgramsNV(IntBuffer programIDs) {
long function_pointer = GLContext.getCapabilities().NV_program_glRequestResidentProgramsNV_pointer;

View file

@ -62,7 +62,6 @@ public final class NVRegisterCombiners {
private NVRegisterCombiners() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetFinalCombinerInputParameterNV(int variable, int pname, IntBuffer params) {
long function_pointer = GLContext.getCapabilities().NV_register_combiners_glGetFinalCombinerInputParameterivNV_pointer;

View file

@ -12,7 +12,6 @@ public final class NVRegisterCombiners2 {
private NVRegisterCombiners2() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer params) {
long function_pointer = GLContext.getCapabilities().NV_register_combiners2_glGetCombinerStageParameterfvNV_pointer;

View file

@ -16,7 +16,6 @@ public final class NVVertexArrayRange {
private NVVertexArrayRange() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glFreeMemoryNV(ByteBuffer pointer) {
long function_pointer = GLContext.getCapabilities().NV_vertex_array_range_glFreeMemoryNV_pointer;

View file

@ -89,7 +89,6 @@ public final class NVVertexProgram extends NVProgram {
private NVVertexProgram() {
}
static native void initNativeStubs() throws LWJGLException;
public static void glVertexAttribs4NV(int index, FloatBuffer v) {
long function_pointer = GLContext.getCapabilities().NV_vertex_program_glVertexAttribs4fvNV_pointer;

View file

@ -110,7 +110,7 @@ public class ContextCapabilitiesGenerator {
if (!context_specific) {
writer.println("\t\tif (" + STUBS_LOADED_NAME + ")");
writer.println("\t\t\treturn GLContext.getSupportedExtensions();");
writer.println("\t\torg.lwjgl.opengl.GL11.initNativeStubs();");
writer.println("\t\torg.lwjgl.opengl.GL11." + Utils.STUB_INITIALIZER_NAME + "();");
} else {
writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "())");
writer.println("\t\t\tthrow new LWJGLException(\"GL11 not supported\");");
@ -143,7 +143,7 @@ public class ContextCapabilitiesGenerator {
writer.print("\t\t\t" + CACHED_EXTS_VAR_NAME + ".remove(\"");
writer.println(translateFieldName(d.getSimpleName()) + "\");");
} else {
writer.print("\t\tGLContext.initNativeStubs(" + Utils.getSimpleClassName(d));
writer.print("\t\tGLContext." + Utils.STUB_INITIALIZER_NAME + "(" + Utils.getSimpleClassName(d));
writer.println(".class, supported_extensions, \"" + translateFieldName(d.getSimpleName()) + "\");");
}
}

View file

@ -194,7 +194,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
java_writer.println("\t}");
java_writer.println();
}
if (d.getMethods().size() > 0)
if (d.getMethods().size() > 0 && !context_specific)
java_writer.println("\tstatic native void " + Utils.STUB_INITIALIZER_NAME + "() throws LWJGLException;");
JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks, context_specific);
java_writer.println("}");