From: <sp...@us...> - 2010-03-11 22:09:21
|
Revision: 3279 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3279&view=rev Author: spasi Date: 2010-03-11 21:06:49 +0000 (Thu, 11 Mar 2010) Log Message: ----------- Added support for OpenGL 3.3 and OpenGL 4.0. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java trunk/LWJGL/src/java/org/lwjgl/util/generator/BufferKind.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLvoid.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeInfo.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/util/generator/Alternate.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object_rgb32.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_bptc.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_rgb10_a2ui.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_swizzle.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_timer_query.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_transform_feedback2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_transform_feedback3.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -85,6 +85,13 @@ throw new IllegalArgumentException("Missing null termination"); } + /** Helper methods to ensure an IntBuffer is null-terminated */ + public static void checkNullTerminated(IntBuffer buf) { + if ( buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + public static void checkNotNull(Object o) { if (o == null) throw new IllegalArgumentException("Null argument"); Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -46,6 +46,8 @@ int pixelPackBuffer; int pixelUnpackBuffer; + int indirectBuffer; + BaseReferences(ContextCapabilities caps) { IntBuffer temp = caps.scratch_int_buffer; @@ -78,6 +80,8 @@ this.pixelPackBuffer = 0; this.pixelUnpackBuffer = 0; + + this.indirectBuffer = 0; } void copy(BaseReferences references, int mask) { @@ -87,6 +91,8 @@ this.glClientActiveTexture = references.glClientActiveTexture; System.arraycopy(references.glVertexAttribPointer_buffer, 0, glVertexAttribPointer_buffer, 0, glVertexAttribPointer_buffer.length); System.arraycopy(references.glTexCoordPointer_buffer, 0, glTexCoordPointer_buffer, 0, glTexCoordPointer_buffer.length); + + this.indirectBuffer = references.indirectBuffer; } if ( (mask & GL11.GL_CLIENT_PIXEL_STORE_BIT) != 0 ) { Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -114,6 +114,18 @@ throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled"); } + /** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureIndirectBOdisabled(ContextCapabilities caps) { + if ( StateTracker.getReferencesStack(caps).getReferences().indirectBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Draw Indirect Object is enabled"); + } + + /** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureIndirectBOenabled(ContextCapabilities caps) { + if ( StateTracker.getReferencesStack(caps).getReferences().indirectBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Draw Indirect Object is disabled"); + } + /** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ static void ensurePackPBOdisabled(ContextCapabilities caps) { if ( StateTracker.getReferencesStack(caps).getReferences().pixelPackBuffer != 0 ) Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -199,7 +199,13 @@ LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); } + // ----------------------[ 4.X ]---------------------- + if ( 4 <= majorVersion ) + supported_extensions.add("OpenGL40"); + // ----------------------[ 3.X ]---------------------- + if ( 3 < majorVersion || (3 == majorVersion && 3 <= minorVersion) ) + supported_extensions.add("OpenGL33"); if ( 3 < majorVersion || (3 == majorVersion && 2 <= minorVersion) ) supported_extensions.add("OpenGL32"); if ( 3 < majorVersion || (3 == majorVersion && 1 <= minorVersion) ) Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -76,6 +76,9 @@ case GL21.GL_PIXEL_UNPACK_BUFFER: references_stack.getReferences().pixelUnpackBuffer = buffer; break; + case GL40.GL_DRAW_INDIRECT_BUFFER: + references_stack.getReferences().indirectBuffer = buffer; + break; } } Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/Alternate.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Alternate.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Alternate.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 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.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * When a method is annonated with @Alternate, no native stub will be created and the Java method will be renamed to value(). + * This can be useful when we want to provide an alternate GL call with different arguments (created by different annotations) + * + * @author spasi <sp...@us...> + */ +@Target({ ElementType.METHOD }) +public @interface Alternate { + /** This must match an existing GL method name. */ + String value(); +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/BufferKind.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/BufferKind.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/BufferKind.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -42,5 +42,6 @@ UnpackPBO, PackPBO, ElementVBO, - ArrayVBO + ArrayVBO, + IndirectBO } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -188,7 +188,7 @@ private static Class[] getValidBufferTypes(Class type) { if ( type.equals(IntBuffer.class) ) return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, - GLsizei.class, GLuint.class }; + GLsizei.class, GLuint.class, GLvoid.class }; else if ( type.equals(FloatBuffer.class) ) return new Class[] { GLclampf.class, GLfloat.class }; else if ( type.equals(ByteBuffer.class) ) Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLvoid.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLvoid.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLvoid.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -41,7 +41,10 @@ import java.lang.annotation.Target; import java.lang.annotation.ElementType; +import com.sun.mirror.type.PrimitiveType; + @NativeType @Target({ElementType.PARAMETER, ElementType.METHOD}) public @interface GLvoid { + PrimitiveType.Kind value() default PrimitiveType.Kind.BYTE; } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -138,7 +138,7 @@ break; } } - if (!found_auto_size_param && param.getAnnotation(Result.class) == null) + if (!found_auto_size_param && param.getAnnotation(Result.class) == null && param.getAnnotation(Constant.class) == null) throw new RuntimeException(param + " has no Check, Result nor Constant annotation and no other parameters has" + " an @AutoSize annotation on it in method " + method); } @@ -146,8 +146,8 @@ throw new RuntimeException(param + " can't be annotated with both CachedReference and Result"); if (param.getAnnotation(BufferObject.class) != null && param.getAnnotation(Result.class) != null) throw new RuntimeException(param + " can't be annotated with both BufferObject and Result"); - if (param.getAnnotation(Constant.class) != null) - throw new RuntimeException("Buffer parameter " + param + " cannot be Constant"); + //if (param.getAnnotation(Constant.class) != null) + //throw new RuntimeException("Buffer parameter " + param + " cannot be Constant"); } else { if (param.getAnnotation(BufferObject.class) != null) throw new RuntimeException(param + " type is not a buffer, but annotated as a BufferObject"); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -71,10 +71,12 @@ if ( method.getAnnotation(CachedResult.class) != null && !method.getAnnotation(CachedResult.class).isRange() ) { printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.CACHEDRESULT, generate_error_checks, context_specific); } - printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); - if (Utils.hasMethodBufferObjectParameter(method)) { - printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.BUFFEROBJECT, generate_error_checks, context_specific); - printJavaNativeStub(writer, method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); + if ( method.getAnnotation(Alternate.class) == null ) { + printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); + if (Utils.hasMethodBufferObjectParameter(method)) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.BUFFEROBJECT, generate_error_checks, context_specific); + printJavaNativeStub(writer, method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); + } } } @@ -194,7 +196,9 @@ writer.print("\tpublic static "); printResultType(writer, method, false); StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class); - String method_name = method.getSimpleName(); + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null ? method.getSimpleName() : alt_annotation.value(); if (strip_annotation != null && mode == Mode.NORMAL) method_name = getPostfixStrippedName(type_map, interface_decl, method); writer.print(" " + method_name + "("); @@ -298,7 +302,10 @@ postfix_parameter.getType().accept(translator); postfix = translator.getSignature(); } - String method_name = method.getSimpleName(); + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null ? method.getSimpleName() : alt_annotation.value(); + String extension_postfix = "NULL".equals(strip_annotation.extension()) ? getExtensionPostfix(interface_decl) : strip_annotation.extension(); String result; @@ -491,7 +498,7 @@ can_be_null = check_annotation.canBeNull(); } NullTerminated null_terminated = param.getAnnotation(NullTerminated.class); - if (Buffer.class.isAssignableFrom(java_type)) { + if (Buffer.class.isAssignableFrom(java_type) && param.getAnnotation(Constant.class) == null) { boolean indirect_buffer_allowed = false && param.getAnnotation(CachedReference.class) == null; // DISABLED: indirect buffer support boolean out_parameter = param.getAnnotation(OutParameter.class) != null; TypeInfo typeinfo = typeinfos.get(param); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeInfo.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeInfo.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeInfo.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -168,7 +168,9 @@ } } Class type; - PrimitiveType.Kind kind = type_map.getPrimitiveTypeFromNativeType(annotation_type); + PrimitiveType.Kind kind; + GLvoid void_annotation = param.getAnnotation(GLvoid.class); + kind = void_annotation == null ? type_map.getPrimitiveTypeFromNativeType(annotation_type) : void_annotation.value(); if (Utils.getNIOBufferType(decl_type) != null) type = getBufferTypeFromPrimitiveKind(kind); else Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -253,7 +253,9 @@ } public static String getSimpleNativeMethodName(MethodDeclaration method, boolean generate_error_checks, boolean context_specific) { - String method_name = method.getSimpleName(); + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null ? method.getSimpleName() : alt_annotation.value(); if (isMethodIndirect(generate_error_checks, context_specific, method)) method_name = OVERLOADED_METHOD_PREFIX + method_name; return method_name; Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 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.Const; +import org.lwjgl.util.generator.GLchar; +import org.lwjgl.util.generator.GLuint; +import org.lwjgl.util.generator.NullTerminated; + +import java.nio.ByteBuffer; + +public interface ARB_blend_func_extended { + + /** + * Accepted by the <src> and <dst> parameters of BlendFunc and + * BlendFunci, and by the <srcRGB>, <dstRGB>, <srcAlpha> and <dstAlpha> + * parameters of BlendFuncSeparate and BlendFuncSeparatei: + */ + int GL_SRC1_COLOR = 0x88F9; + int GL_SRC1_ALPHA = GL15.GL_SRC1_ALPHA; + int GL_ONE_MINUS_SRC1_COLOR = 0x88FA; + int GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + + void glBindFragDataLocationIndexed(@GLuint int program, @GLuint int colorNumber, @GLuint int index, @NullTerminated @Const @GLchar ByteBuffer name); + + int glGetFragDataIndex(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2008 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.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface ARB_draw_indirect { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, and + * CopyBufferSubData: + */ + int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + + void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + + void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @NullTerminated @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 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; + +public interface ARB_explicit_attrib_location { +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 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; + +public interface ARB_gpu_shader5 { + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev, and GetInteger64v: + */ + int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A; + int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B; + int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C; + int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; + int GL_MAX_VERTEX_STREAMS = 0x8E71; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2002-2008 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.*; + +@Dependent +@Extension(postfix = "") +public interface ARB_gpu_shader_fp64 { + + /** + * Returned in the <type> parameter of GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + int GL_DOUBLE = GL11.GL_DOUBLE; + int GL_DOUBLE_VEC2 = 0x8FFC; + int GL_DOUBLE_VEC3 = 0x8FFD; + int GL_DOUBLE_VEC4 = 0x8FFE; + int GL_DOUBLE_MAT2 = 0x8F46; + int GL_DOUBLE_MAT3 = 0x8F47; + int GL_DOUBLE_MAT4 = 0x8F48; + int GL_DOUBLE_MAT2x3 = 0x8F49; + int GL_DOUBLE_MAT2x4 = 0x8F4A; + int GL_DOUBLE_MAT3x2 = 0x8F4B; + int GL_DOUBLE_MAT3x4 = 0x8F4C; + int GL_DOUBLE_MAT4x2 = 0x8F4D; + int GL_DOUBLE_MAT4x3 = 0x8F4E; + + void glUniform1d(int location, double x); + + void glUniform2d(int location, double x, double y); + + void glUniform3d(int location, double x, double y, double z); + + void glUniform4d(int location, double x, double y, double z, double w); + + @StripPostfix("value") + void glUniform1dv(int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform2dv(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform3dv(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform4dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3dv(int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4dv(int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2x3dv(int location, @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2x4dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3x2dv(int location, @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3x4dv(int location, @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4x2dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4x3dv(int location, @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("params") + void glGetUniformdv(@GLuint int program, int location, @OutParameter @Check DoubleBuffer params); + + // ---- + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform1dEXT(@GLuint int program, int location, double x); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform2dEXT(@GLuint int program, int location, double x, double y); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform3dEXT(@GLuint int program, int location, double x, double y, double z); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform4dEXT(@GLuint int program, int location, double x, double y, double z, double w); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value="value", extension="EXT") + void glProgramUniform1dvEXT(@GLuint int program, int location, @AutoSize(value = "value") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2x3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2x4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3x2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3x4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4x2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4x3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 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; + +public interface ARB_occlusion_query2 { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + int GL_ANY_SAMPLES_PASSED = 0x8C2F; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2002-2008 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.FloatBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_sampler_objects { + + /** + * Accepted by the <value> parameter of the GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev functions: + */ + int GL_SAMPLER_BINDING = 0x8919; + + void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers); + + boolean glIsSampler(@GLuint int sampler); + + void glBindSampler(@GLenum int unit, @GLuint int sampler); + + void glSamplerParameteri(@GLuint int sampler, @GLenum int pname, int param); + + void glSamplerParameterf(@GLuint int sampler, @GLenum int pname, float param); + + @StripPostfix("params") + void glSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterIfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 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; + +public interface ARB_shader_bit_encoding { +} \ No newline at end of file Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_objects.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_objects.java 2010-03-08 21:29:32 UTC (rev 3278) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_objects.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -144,37 +144,37 @@ void glUniform4iARB(int location, int v0, int v1, int v2, int v3); @StripPostfix("values") - void glUniform1fvARB(int location, @AutoSize("values") @GLsizei int count, FloatBuffer values); + void glUniform1fvARB(int location, @AutoSize("values") @GLsizei int count, @Const FloatBuffer values); @StripPostfix("values") - void glUniform2fvARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, FloatBuffer values); + void glUniform2fvARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const FloatBuffer values); @StripPostfix("values") - void glUniform3fvARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, FloatBuffer values); + void glUniform3fvARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const FloatBuffer values); @StripPostfix("values") - void glUniform4fvARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, FloatBuffer values); + void glUniform4fvARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const FloatBuffer values); @StripPostfix("values") - void glUniform1ivARB(int location, @AutoSize(value = "values") @GLsizei int count, IntBuffer values); + void glUniform1ivARB(int location, @AutoSize(value = "values") @GLsizei int count, @Const IntBuffer values); @StripPostfix("values") - void glUniform2ivARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, IntBuffer values); + void glUniform2ivARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const IntBuffer values); @StripPostfix("values") - void glUniform3ivARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, IntBuffer values); + void glUniform3ivARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const IntBuffer values); @StripPostfix("values") - void glUniform4ivARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, IntBuffer values); + void glUniform4ivARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const IntBuffer values); @StripPostfix("matrices") - void glUniformMatrix2fvARB(int location, @AutoSize(value = "matrices", expression = " >> 2") @GLsizei int count, boolean transpose, FloatBuffer matrices); + void glUniformMatrix2fvARB(int location, @AutoSize(value = "matrices", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); @StripPostfix("matrices") - void glUniformMatrix3fvARB(int location, @AutoSize(value = "matrices", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, FloatBuffer matrices); + void glUniformMatrix3fvARB(int location, @AutoSize(value = "matrices", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); @StripPostfix("matrices") - void glUniformMatrix4fvARB(int location, @AutoSize(value = "matrices", expression = " >> 4") @GLsizei int count, boolean transpose, FloatBuffer matrices); + void glUniformMatrix4fvARB(int location, @AutoSize(value = "matrices", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); @StripPostfix("params") void glGetObjectParameterfvARB(@GLhandleARB int obj, @GLenum int pname, @OutParameter @Check FloatBuffer params); Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 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.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_shader_subroutine { + + /** Accepted by the <pname> parameter of GetProgramStageiv: */ + int GL_ACTIVE_SUBROUTINES = 0x8DE5; + int GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6; + int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47; + int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48; + int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_SUBROUTINES = 0x8DE7; + int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + + /** Accepted by the <pname> parameter of GetActiveSubroutineUniformiv: */ + int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A; + int GL_COMPATIBLE_SUBROUTINES = 0x8E4B; + int GL_UNIFORM_SIZE = GL31.GL_UNIFORM_SIZE; + int GL_UNIFORM_NAME_LENGTH = GL31.GL_UNIFORM_NAME_LENGTH; + + int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @GLuint + int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @StripPostfix("values") + void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @Check("1") @OutParameter IntBuffer values); + + void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index, + @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter ByteBuffer name); + + void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index, + @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter ByteBuffer name); + + @StripPostfix("indices") + void glUniformSubroutinesuiv(@GLenum int shadertype, @AutoSize("indices") @GLsizei int count, @Const @GLuint IntBuffer indices); + + @StripPostfix("params") + void glGetUniformSubroutineuiv(@GLenum int shadertype, int location, @Check("1") @OutParameter @GLuint IntBuffer params); + + @StripPostfix("values") + void glGetProgramStageiv(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @Check("1") @OutParameter IntBuffer values); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 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.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_shading_language_include { + + /** Accepted by the <type> parameter of NamedStringARB: */ + int GL_SHADER_INCLUDE_ARB = 0x8DAE; + + /** Accepted by the <pname> parameter of GetNamedStringivARB: */ + int GL_NAMED_STRING_LENGTH_ARB = 0x8DE9; + int GL_NAMED_STRING_TYPE_ARB = 0x8DEA; + + void glNamedStringARB(@GLenum int type, @AutoSize("name") int namelen, @Const ByteBuffer name, @AutoSize("string") int stringlen, @Const ByteBuffer string); + + void glDeleteNamedStringARB(@AutoSize("name") int namelen, @Const ByteBuffer name); + + void glCompileShaderIncludeARB(@GLuint int shader, @GLsizei int count, + @Const @NullTerminated("count") @StringList("count") @GLchar ByteBuffer path, + @Constant("null, 0") @Const IntBuffer length); + + /* TODO: Implement @Check + @Alternate("glCompileShaderIncludeARB") + void glCompileShaderIncludeARB2(@GLuint int shader, @AutoSize("length") @GLsizei int count, + @Const @Check("...") @StringList("count") @GLchar ByteBuffer path, + @Const IntBuffer length); + */ + + boolean glIsNamedStringARB(@AutoSize("name") int namelen, @Const ByteBuffer name); + + void glGetNamedStringARB(@AutoSize("name") int namelen, @Const ByteBuffer name, + @AutoSize("string") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen, + @OutParameter ByteBuffer string); + + @StripPostfix("params") + void glGetNamedStringivARB(@AutoSize("name") int namelen, @Const ByteBuffer name, @GLenum int pname, @Check("1") @OutParameter IntBuffer params); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java 2010-03-11 21:06:49 UTC (rev 3279) @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2002-2008 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... [truncated message content] |