|
From: <eli...@us...> - 2006-05-01 08:58:58
|
Revision: 2315 Author: elias_naur Date: 2006-05-01 01:58:26 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2315&view=rev Log Message: ----------- Fixed warning from generated native code on mac os x Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/native/generated/org_lwjgl_opengl_ARBShaderObjects.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL20.c Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2006-04-30 21:15:30 UTC (rev 2314) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2006-05-01 08:58:26 UTC (rev 2315) @@ -128,7 +128,7 @@ writer.print(" = "); } writer.print(method.getSimpleName() + "("); - generateCallParameters(writer, method.getParameters()); + generateCallParameters(writer, type_map, method.getParameters()); writer.print(")"); writer.println(";"); generateStringDeallocations(writer, method.getParameters()); @@ -156,19 +156,27 @@ writer.println(); } - private static void generateCallParameters(PrintWriter writer, Collection<ParameterDeclaration> params) { + private static void generateCallParameters(PrintWriter writer, TypeMap type_map, Collection<ParameterDeclaration> params) { if (params.size() > 0) { Iterator<ParameterDeclaration> it = params.iterator(); - generateCallParameter(writer, it.next()); + generateCallParameter(writer, type_map, it.next()); while (it.hasNext()) { writer.print(", "); - generateCallParameter(writer, it.next()); + generateCallParameter(writer, type_map, it.next()); } } } - private static void generateCallParameter(PrintWriter writer, ParameterDeclaration param) { - if (param.getAnnotation(Result.class) != null || param.getAnnotation(Indirect.class) != null) + private static void generateCallParameter(PrintWriter writer, TypeMap type_map, ParameterDeclaration param) { + boolean is_indirect = param.getAnnotation(Indirect.class) != null; + if (is_indirect) { + writer.print("("); + NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); + param.getType().accept(translator); + writer.print(translator.getSignature()); + writer.print("*)"); + } + if (param.getAnnotation(Result.class) != null || is_indirect) writer.print("&"); if (param.getAnnotation(Result.class) != null) { writer.print(Utils.RESULT_VAR_NAME); Modified: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_ARBShaderObjects.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_ARBShaderObjects.c 2006-04-30 21:15:30 UTC (rev 2314) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_ARBShaderObjects.c 2006-05-01 08:58:26 UTC (rev 2315) @@ -68,7 +68,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglShaderSourceARB(JNIEnv *env, jclass clazz, jint shader, jint count, jobject string, jint string_position, jint length, jlong function_pointer) { const GLcharARB *string_address = ((const GLcharARB *)(*env)->GetDirectBufferAddress(env, string)) + string_position; glShaderSourceARBPROC glShaderSourceARB = (glShaderSourceARBPROC)((intptr_t)function_pointer); - glShaderSourceARB(shader, count, &string_address, &length); + glShaderSourceARB(shader, count, (const GLcharARB **)&string_address, (const GLint*)&length); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglCompileShaderARB(JNIEnv *env, jclass clazz, jint shaderObj, jlong function_pointer) { Modified: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL20.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL20.c 2006-04-30 21:15:30 UTC (rev 2314) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL20.c 2006-05-01 08:58:26 UTC (rev 2315) @@ -77,7 +77,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglShaderSource(JNIEnv *env, jclass clazz, jint shader, jint count, jobject string, jint string_position, jint length, jlong function_pointer) { const GLchar *string_address = ((const GLchar *)(*env)->GetDirectBufferAddress(env, string)) + string_position; glShaderSourcePROC glShaderSource = (glShaderSourcePROC)((intptr_t)function_pointer); - glShaderSource(shader, count, &string_address, &length); + glShaderSource(shader, count, (const GLchar **)&string_address, (const GLint*)&length); } JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20_nglCreateShader(JNIEnv *env, jclass clazz, jint type, jlong function_pointer) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sp...@us...> - 2006-08-03 09:52:15
|
Revision: 2543 Author: spasi Date: 2006-08-03 02:51:45 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2543&view=rev Log Message: ----------- Modified Paths: -------------- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java Added Paths: ----------- trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL21.c trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-08-01 14:10:17 UTC (rev 2542) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-08-03 09:51:45 UTC (rev 2543) @@ -107,6 +107,7 @@ public final boolean OpenGL14; public final boolean OpenGL15; public final boolean OpenGL20; + public final boolean OpenGL21; public final boolean GL_HP_occlusion_test; public final boolean GL_IBM_rasterpos_clip; public final boolean GL_NV_blend_square; @@ -874,6 +875,12 @@ long GL20_glStencilFuncSeparate_pointer; long GL20_glStencilMaskSeparate_pointer; long GL20_glBlendEquationSeparate_pointer; + long GL21_glUniformMatrix2x3fv_pointer; + long GL21_glUniformMatrix3x2fv_pointer; + long GL21_glUniformMatrix2x4fv_pointer; + long GL21_glUniformMatrix4x2fv_pointer; + long GL21_glUniformMatrix3x4fv_pointer; + long GL21_glUniformMatrix4x3fv_pointer; long NV_evaluators_glGetMapControlPointsNV_pointer; long NV_evaluators_glMapControlPointsNV_pointer; long NV_evaluators_glMapParameterfvNV_pointer; @@ -1929,6 +1936,16 @@ (GL20_glBlendEquationSeparate_pointer = GLContext.getFunctionAddress("glBlendEquationSeparate")) != 0; } + private boolean GL21_initNativeFunctionAddresses() { + return + (GL21_glUniformMatrix2x3fv_pointer = GLContext.getFunctionAddress("glUniformMatrix2x3fv")) != 0 && + (GL21_glUniformMatrix3x2fv_pointer = GLContext.getFunctionAddress("glUniformMatrix3x2fv")) != 0 && + (GL21_glUniformMatrix2x4fv_pointer = GLContext.getFunctionAddress("glUniformMatrix2x4fv")) != 0 && + (GL21_glUniformMatrix4x2fv_pointer = GLContext.getFunctionAddress("glUniformMatrix4x2fv")) != 0 && + (GL21_glUniformMatrix3x4fv_pointer = GLContext.getFunctionAddress("glUniformMatrix3x4fv")) != 0 && + (GL21_glUniformMatrix4x3fv_pointer = GLContext.getFunctionAddress("glUniformMatrix4x3fv")) != 0; + } + private boolean NV_evaluators_initNativeFunctionAddresses() { return (NV_evaluators_glGetMapControlPointsNV_pointer = GLContext.getFunctionAddress("glGetMapControlPointsNV")) != 0 && @@ -2225,6 +2242,8 @@ supported_extensions.remove("OpenGL15"); if (supported_extensions.contains("OpenGL20") && !GL20_initNativeFunctionAddresses()) supported_extensions.remove("OpenGL20"); + if (supported_extensions.contains("OpenGL21") && !GL21_initNativeFunctionAddresses()) + supported_extensions.remove("OpenGL21"); if (supported_extensions.contains("GL_NV_evaluators") && !NV_evaluators_initNativeFunctionAddresses()) supported_extensions.remove("GL_NV_evaluators"); if (supported_extensions.contains("GL_NV_fence") && !NV_fence_initNativeFunctionAddresses()) @@ -2361,6 +2380,7 @@ this.OpenGL14 = supported_extensions.contains("OpenGL14"); this.OpenGL15 = supported_extensions.contains("OpenGL15"); this.OpenGL20 = supported_extensions.contains("OpenGL20"); + this.OpenGL21 = supported_extensions.contains("OpenGL21"); this.GL_HP_occlusion_test = supported_extensions.contains("GL_HP_occlusion_test"); this.GL_IBM_rasterpos_clip = supported_extensions.contains("GL_IBM_rasterpos_clip"); this.GL_NV_blend_square = supported_extensions.contains("GL_NV_blend_square"); Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java (rev 0) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/GL21.java 2006-08-03 09:51:45 UTC (rev 2543) @@ -0,0 +1,95 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class GL21 { + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + public static final int GL_PIXEL_PACK_BUFFER = 0x88eb; + public static final int GL_PIXEL_UNPACK_BUFFER = 0x88ec; + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ed; + public static final int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88ef; + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + public static final int GL_SRGB = 0x8c40; + public static final int GL_SRGB8 = 0x8c41; + public static final int GL_SRGB_ALPHA = 0x8c42; + public static final int GL_SRGB8_ALPHA8 = 0x8c43; + public static final int GL_SLUMINANCE_ALPHA = 0x8c44; + public static final int GL_SLUMINANCE8_ALPHA8 = 0x8c45; + public static final int GL_SLUMINANCE = 0x8c46; + public static final int GL_SLUMINANCE8 = 0x8c47; + public static final int GL_COMPRESSED_SRGB = 0x8c48; + public static final int GL_COMPRESSED_SRGB_ALPHA = 0x8c49; + public static final int GL_COMPRESSED_SLUMINANCE = 0x8c4a; + public static final int GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8c4b; + /** + * Accepted by the <pname> parameter of GetIntegerv and GetFloatv. + */ + public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = 0xffffffff; + + private GL21() { + } + + + public static void glUniformMatrix2x3(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix2x3fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x3fv(location, (matrices.remaining()) / (2 * 3), transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix2x3fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); + + public static void glUniformMatrix3x2(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix3x2fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x2fv(location, (matrices.remaining()) / (3 * 2), transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix3x2fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); + + public static void glUniformMatrix2x4(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix2x4fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x4fv(location, (matrices.remaining()) >> 3, transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix2x4fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); + + public static void glUniformMatrix4x2(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix4x2fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x2fv(location, (matrices.remaining()) >> 3, transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix4x2fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); + + public static void glUniformMatrix3x4(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix3x4fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x4fv(location, (matrices.remaining()) / (3 * 4), transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix3x4fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); + + public static void glUniformMatrix4x3(int location, boolean transpose, FloatBuffer matrices) { + long function_pointer = GLContext.getCapabilities().GL21_glUniformMatrix4x3fv_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x3fv(location, (matrices.remaining()) / (4 * 3), transpose, matrices, matrices.position(), function_pointer); + } + private static native void nglUniformMatrix4x3fv(int location, int count, boolean transpose, FloatBuffer matrices, int matrices_position, long function_pointer); +} Added: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL21.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL21.c (rev 0) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL21.c 2006-08-03 09:51:45 UTC (rev 2543) @@ -0,0 +1,48 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include <jni.h> +#include "extgl.h" + +typedef void (APIENTRY *glUniformMatrix2x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix2x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix2x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix2x3fvPROC glUniformMatrix2x3fv = (glUniformMatrix2x3fvPROC)((intptr_t)function_pointer); + glUniformMatrix2x3fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix3x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix3x2fvPROC glUniformMatrix3x2fv = (glUniformMatrix3x2fvPROC)((intptr_t)function_pointer); + glUniformMatrix3x2fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix2x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix2x4fvPROC glUniformMatrix2x4fv = (glUniformMatrix2x4fvPROC)((intptr_t)function_pointer); + glUniformMatrix2x4fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix4x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix4x2fvPROC glUniformMatrix4x2fv = (glUniformMatrix4x2fvPROC)((intptr_t)function_pointer); + glUniformMatrix4x2fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix3x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix3x4fvPROC glUniformMatrix3x4fv = (glUniformMatrix3x4fvPROC)((intptr_t)function_pointer); + glUniformMatrix3x4fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix4x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jobject matrices, jint matrices_position, jlong function_pointer) { + GLfloat *matrices_address = ((GLfloat *)(*env)->GetDirectBufferAddress(env, matrices)) + matrices_position; + glUniformMatrix4x3fvPROC glUniformMatrix4x3fv = (glUniformMatrix4x3fvPROC)((intptr_t)function_pointer); + glUniformMatrix4x3fv(location, count, transpose, matrices_address); +} + Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java 2006-08-03 09:51:45 UTC (rev 2543) @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +import java.nio.*; + +public interface GL21 { + + // ------------------------------------------------------------------ + // --------------------------[ GLSL 1.20 ]--------------------------- + // ------------------------------------------------------------------ + + @StripPostfix("matrices") + void glUniformMatrix2x3fv(int location, @AutoSize(value = "matrices", expression = " / (2 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x2fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 2)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix2x4fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x2fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x4fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 4)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x3fv(int location, @AutoSize(value = "matrices", expression = " / (4 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + // ------------------------------------------------------------------ + // -------------------[ ARB_pixel_buffer_object ]-------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + int GL_PIXEL_PACK_BUFFER = 0x88EB; + int GL_PIXEL_UNPACK_BUFFER = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED; + int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + + // ------------------------------------------------------------------ + // ----------------------[ EXT_texture_sRGB ]------------------------ + // ------------------------------------------------------------------ + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + int GL_SRGB = 0x8C40; + int GL_SRGB8 = 0x8C41; + int GL_SRGB_ALPHA = 0x8C42; + int GL_SRGB8_ALPHA8 = 0x8C43; + int GL_SLUMINANCE_ALPHA = 0x8C44; + int GL_SLUMINANCE8_ALPHA8 = 0x8C45; + int GL_SLUMINANCE = 0x8C46; + int GL_SLUMINANCE8 = 0x8C47; + int GL_COMPRESSED_SRGB = 0x8C48; + int GL_COMPRESSED_SRGB_ALPHA = 0x8C49; + int GL_COMPRESSED_SLUMINANCE = 0x8C4A; + int GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B; + + // ------------------------------------------------------------------ + // -----------------------[ Misc additions ]------------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <pname> parameter of GetIntegerv and GetFloatv. + */ + int GL_CURRENT_RASTER_SECONDARY_COLOR = -1; // TODO: Find this value + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sp...@us...> - 2006-08-16 10:43:12
|
Revision: 2550 Author: spasi Date: 2006-08-16 03:42:43 -0700 (Wed, 16 Aug 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2550&view=rev Log Message: ----------- Added EXT_blend_color & EXT_blend_minmax extensions. Modified Paths: -------------- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java Added Paths: ----------- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendColor.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendColor.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendMinmax.c trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_color.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-08-10 09:27:38 UTC (rev 2549) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-08-16 10:42:43 UTC (rev 2550) @@ -64,8 +64,10 @@ public final boolean GL_ATI_vertex_streams; public final boolean GL_EXT_abgr; public final boolean GL_EXT_bgra; + public final boolean GL_EXT_blend_color; public final boolean GL_EXT_blend_equation_separate; public final boolean GL_EXT_blend_func_separate; + public final boolean GL_EXT_blend_minmax; public final boolean GL_EXT_blend_subtract; public final boolean GL_EXT_cg_shader; public final boolean GL_EXT_compiled_vertex_array; @@ -421,8 +423,10 @@ long ATI_vertex_streams_glClientActiveVertexStreamATI_pointer; long ATI_vertex_streams_glVertexBlendEnvfATI_pointer; long ATI_vertex_streams_glVertexBlendEnviATI_pointer; + long EXT_blend_color_glBlendColorEXT_pointer; long EXT_blend_equation_separate_glBlendEquationSeparateEXT_pointer; long EXT_blend_func_separate_glBlendFuncSeparateEXT_pointer; + long EXT_blend_minmax_glBlendEquationEXT_pointer; long EXT_compiled_vertex_array_glLockArraysEXT_pointer; long EXT_compiled_vertex_array_glUnlockArraysEXT_pointer; long EXT_depth_bounds_test_glDepthBoundsEXT_pointer; @@ -1386,6 +1390,11 @@ (ATI_vertex_streams_glVertexBlendEnviATI_pointer = GLContext.getFunctionAddress("glVertexBlendEnviATI")) != 0; } + private boolean EXT_blend_color_initNativeFunctionAddresses() { + return + (EXT_blend_color_glBlendColorEXT_pointer = GLContext.getFunctionAddress("glBlendColorEXT")) != 0; + } + private boolean EXT_blend_equation_separate_initNativeFunctionAddresses() { return (EXT_blend_equation_separate_glBlendEquationSeparateEXT_pointer = GLContext.getFunctionAddress("glBlendEquationSeparateEXT")) != 0; @@ -1396,6 +1405,11 @@ (EXT_blend_func_separate_glBlendFuncSeparateEXT_pointer = GLContext.getFunctionAddress("glBlendFuncSeparateEXT")) != 0; } + private boolean EXT_blend_minmax_initNativeFunctionAddresses() { + return + (EXT_blend_minmax_glBlendEquationEXT_pointer = GLContext.getFunctionAddress("glBlendEquationEXT")) != 0; + } + private boolean EXT_compiled_vertex_array_initNativeFunctionAddresses() { return (EXT_compiled_vertex_array_glLockArraysEXT_pointer = GLContext.getFunctionAddress("glLockArraysEXT")) != 0 && @@ -2196,10 +2210,14 @@ supported_extensions.remove("GL_ATI_vertex_attrib_array_object"); if (supported_extensions.contains("GL_ATI_vertex_streams") && !ATI_vertex_streams_initNativeFunctionAddresses()) supported_extensions.remove("GL_ATI_vertex_streams"); + if (supported_extensions.contains("GL_EXT_blend_color") && !EXT_blend_color_initNativeFunctionAddresses()) + supported_extensions.remove("GL_EXT_blend_color"); if (supported_extensions.contains("GL_EXT_blend_equation_separate") && !EXT_blend_equation_separate_initNativeFunctionAddresses()) supported_extensions.remove("GL_EXT_blend_equation_separate"); if (supported_extensions.contains("GL_EXT_blend_func_separate") && !EXT_blend_func_separate_initNativeFunctionAddresses()) supported_extensions.remove("GL_EXT_blend_func_separate"); + if (supported_extensions.contains("GL_EXT_blend_minmax") && !EXT_blend_minmax_initNativeFunctionAddresses()) + supported_extensions.remove("GL_EXT_blend_minmax"); if (supported_extensions.contains("GL_EXT_compiled_vertex_array") && !EXT_compiled_vertex_array_initNativeFunctionAddresses()) supported_extensions.remove("GL_EXT_compiled_vertex_array"); if (supported_extensions.contains("GL_EXT_depth_bounds_test") && !EXT_depth_bounds_test_initNativeFunctionAddresses()) @@ -2336,8 +2354,10 @@ this.GL_ATI_vertex_streams = supported_extensions.contains("GL_ATI_vertex_streams"); this.GL_EXT_abgr = supported_extensions.contains("GL_EXT_abgr"); this.GL_EXT_bgra = supported_extensions.contains("GL_EXT_bgra"); + this.GL_EXT_blend_color = supported_extensions.contains("GL_EXT_blend_color"); this.GL_EXT_blend_equation_separate = supported_extensions.contains("GL_EXT_blend_equation_separate"); this.GL_EXT_blend_func_separate = supported_extensions.contains("GL_EXT_blend_func_separate"); + this.GL_EXT_blend_minmax = supported_extensions.contains("GL_EXT_blend_minmax"); this.GL_EXT_blend_subtract = supported_extensions.contains("GL_EXT_blend_subtract"); this.GL_EXT_cg_shader = supported_extensions.contains("GL_EXT_cg_shader"); this.GL_EXT_compiled_vertex_array = supported_extensions.contains("GL_EXT_compiled_vertex_array"); Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendColor.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendColor.java (rev 0) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendColor.java 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class EXTBlendColor { + /** + *Accepted by the <sfactor> and <dfactor> parameters of BlendFunc. + */ + public static final int GL_CONSTANT_COLOR_EXT = 0x8001; + public static final int GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002; + public static final int GL_CONSTANT_ALPHA_EXT = 0x8003; + public static final int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_BLEND_COLOR_EXT = 0x8005; + + private EXTBlendColor() { + } + + + public static void glBlendColorEXT(float red, float green, float blue, float alpha) { + long function_pointer = GLContext.getCapabilities().EXT_blend_color_glBlendColorEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendColorEXT(red, green, blue, alpha, function_pointer); + } + private static native void nglBlendColorEXT(float red, float green, float blue, float alpha, long function_pointer); +} Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java (rev 0) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class EXTBlendMinmax { + /** + *Accepted by the <mode> parameter of BlendEquationEXT. + */ + public static final int GL_FUNC_ADD_EXT = 0x8006; + public static final int GL_MIN_EXT = 0x8007; + public static final int GL_MAX_EXT = 0x8008; + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_BLEND_EQUATION_EXT = 0x8009; + + private EXTBlendMinmax() { + } + + + public static void glBlendEquationEXT(int mode) { + long function_pointer = GLContext.getCapabilities().EXT_blend_minmax_glBlendEquationEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationEXT(mode, function_pointer); + } + private static native void nglBlendEquationEXT(int mode, long function_pointer); +} Added: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendColor.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendColor.c (rev 0) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendColor.c 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include <jni.h> +#include "extgl.h" + +typedef void (APIENTRY *glBlendColorEXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendColor_nglBlendColorEXT(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glBlendColorEXTPROC glBlendColorEXT = (glBlendColorEXTPROC)((intptr_t)function_pointer); + glBlendColorEXT(red, green, blue, alpha); +} + Added: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendMinmax.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendMinmax.c (rev 0) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTBlendMinmax.c 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include <jni.h> +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationEXTPROC) (GLenum mode); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendMinmax_nglBlendEquationEXT(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glBlendEquationEXTPROC glBlendEquationEXT = (glBlendEquationEXTPROC)((intptr_t)function_pointer); + glBlendEquationEXT(mode); +} + Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_color.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_color.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_color.java 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2006 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +public interface EXT_blend_color { + + /** Accepted by the <sfactor> and <dfactor> parameters of BlendFunc. */ + int GL_CONSTANT_COLOR_EXT = 0x8001; + int GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002; + int GL_CONSTANT_ALPHA_EXT = 0x8003; + int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_BLEND_COLOR_EXT = 0x8005; + + void glBlendColorEXT(@GLclampf float red, @GLclampf float green, @GLclampf float blue, @GLclampf float alpha); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java 2006-08-16 10:42:43 UTC (rev 2550) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2006 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +public interface EXT_blend_minmax { + + /** Accepted by the <mode> parameter of BlendEquationEXT. */ + int GL_FUNC_ADD_EXT = 0x8006; + int GL_MIN_EXT = 0x8007; + int GL_MAX_EXT = 0x8008; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_BLEND_EQUATION_EXT = 0x8009; + + void glBlendEquationEXT(@GLenum int mode); + +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |