From: <sp...@us...> - 2009-08-04 18:21:48
|
Revision: 3229 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3229&view=rev Author: spasi Date: 2009-08-04 18:21:41 +0000 (Tue, 04 Aug 2009) Log Message: ----------- Added support for OpenGL 3.2 and the following extensions: AMD_draw_buffers_blend, ARB_depth_clamp, ARB_draw_buffers_blend, ARB_draw_elements_base_vertex, ARB_fragment_coord_conventions, ARB_provoking_vertex, ARB_sample_shading, ARB_seamless_cube_map, ARB_shader_texture_lod, ARB_texture_cube_map_array, ARB_texture_gather, ARB_texture_multisample, ARB_texture_query_lod, ARB_vertex_array_bgra, EXT_separate_shader_objects, EXT_texture_snorm, NV_copy_image, NV_parameter_buffer_object2. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java trunk/LWJGL/src/native/common/extgl.h Added Paths: ----------- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sample_shading.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_gather.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_query_lod.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_array_bgra.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_separate_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_snorm.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_copy_image.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object2.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -48,7 +48,7 @@ * implementation. Developers may encounter debug contexts being the same as non-debug contexts or forward compatible * contexts having support for deprecated functionality. * <p/> - * Warning: This functionality is currently available on the Windows platform only. However, if the forwardCompatible + * If the forwardCompatible * attribute is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0 specification). This * means that developers can start working on cleaning up their applications without an OpenGL 3.0 complaint driver. * @@ -64,6 +64,9 @@ private boolean debug; private boolean forwardCompatible; + private boolean profileCore; + private boolean profileCompatibility; + public ContextAttribs() { this(1, 0); } @@ -72,7 +75,7 @@ if ( majorVersion < 0 || 3 < majorVersion || minorVersion < 0 || - (majorVersion == 3 && 1 < minorVersion) || + (majorVersion == 3 && 2 < minorVersion) || (majorVersion == 2 && 1 < minorVersion) || (majorVersion == 1 && 5 < minorVersion) ) throw new IllegalArgumentException("Invalid OpenGL version specified: " + majorVersion + '.' + minorVersion); @@ -84,6 +87,9 @@ this.debug = false; this.forwardCompatible = false; + + this.profileCore = 3 < majorVersion || (majorVersion == 3 && 2 <= minorVersion) ? true : false; + this.profileCompatibility = false; } private ContextAttribs(final ContextAttribs attribs) { @@ -94,6 +100,9 @@ this.debug = attribs.debug; this.forwardCompatible = attribs.forwardCompatible; + + this.profileCore = attribs.profileCore; + this.profileCompatibility = attribs.profileCompatibility; } public int getMajorVersion() { @@ -116,27 +125,74 @@ return forwardCompatible; } + public boolean isProfileCore() { + return profileCore; + } + + public boolean isProfileCompatibility() { + return profileCompatibility; + } + public ContextAttribs withLayer(final int layerPlane) { if ( layerPlane < 0 ) throw new IllegalArgumentException("Invalid layer plane specified: " + layerPlane); + if ( layerPlane == this.layerPlane ) + return this; + final ContextAttribs attribs = new ContextAttribs(this); attribs.layerPlane = layerPlane; return attribs; } public ContextAttribs withDebug(final boolean debug) { + if ( debug == this.debug ) + return this; + final ContextAttribs attribs = new ContextAttribs(this); attribs.debug = debug; return attribs; } public ContextAttribs withForwardCompatible(final boolean forwardCompatible) { + if ( forwardCompatible == this.forwardCompatible ) + return this; + final ContextAttribs attribs = new ContextAttribs(this); attribs.forwardCompatible = forwardCompatible; return attribs; } + public ContextAttribs withProfileCore(final boolean profileCore) { + if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) + throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); + + if ( profileCore == this.profileCore ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.profileCore = profileCore; + if ( profileCore ) + attribs.profileCompatibility = false; + + return attribs; + } + + public ContextAttribs withProfileCompatibility(final boolean profileCompatibility) { + if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) + throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); + + if ( profileCompatibility == this.profileCompatibility ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.profileCompatibility = profileCompatibility; + if ( profileCompatibility ) + attribs.profileCore = false; + + return attribs; + } + private static ContextAttribsImplementation getImplementation() { switch ( LWJGLUtil.getPlatform() ) { case LWJGLUtil.PLATFORM_LINUX: @@ -168,6 +224,14 @@ if ( 0 < flags ) attribCount++; + int profileMask = 0; + if ( profileCore ) + profileMask |= implementation.getProfileCoreBit(); + else if ( profileCompatibility ) + profileMask |= implementation.getProfileCompatibilityBit(); + if ( 0 < profileMask ) + attribCount++; + if ( attribCount == 0 ) return null; @@ -181,6 +245,8 @@ attribs.put(implementation.getLayerPlaneAttrib()).put(layerPlane); if ( 0 < flags ) attribs.put(implementation.getFlagsAttrib()).put(flags); + if ( 0 < profileMask ) + attribs.put(implementation.getProfileMaskAttrib()).put(profileMask); attribs.put(0); attribs.rewind(); @@ -195,6 +261,13 @@ sb.append(" - Layer=").append(layerPlane); sb.append(" - Debug=").append(debug); sb.append(" - ForwardCompatible=").append(forwardCompatible); + sb.append(" - Profile="); + if ( profileCore ) + sb.append("Core"); + else if ( profileCompatibility ) + sb.append("Compatibility"); + else + sb.append("None"); return sb.toString(); } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -47,4 +47,10 @@ int getForwardCompatibleBit(); + int getProfileMaskAttrib(); + + int getProfileCoreBit(); + + int getProfileCompatibilityBit(); + } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -200,6 +200,8 @@ } // ----------------------[ 3.X ]---------------------- + if ( 3 < majorVersion || (3 == majorVersion && 2 <= minorVersion) ) + supported_extensions.add("OpenGL32"); if ( 3 < majorVersion || (3 == majorVersion && 1 <= minorVersion) ) supported_extensions.add("OpenGL31"); if ( 3 <= majorVersion ) Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -44,10 +44,14 @@ private static final int GLX_CONTEXT_MINOR_VERSION_ARB = 0x2092; private static final int GLX_CONTEXT_LAYER_PLANE_ARB = 0x2093; private static final int GLX_CONTEXT_FLAGS_ARB = 0x2094; + private static final int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126; private static final int GLX_CONTEXT_DEBUG_BIT_ARB = 0x0001; private static final int GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002; + private static final int GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; + private static final int GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; + LinuxContextAttribs() { } @@ -75,4 +79,16 @@ return GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } + public int getProfileMaskAttrib() { + return GLX_CONTEXT_PROFILE_MASK_ARB; + } + + public int getProfileCoreBit() { + return GLX_CONTEXT_CORE_PROFILE_BIT_ARB; + } + + public int getProfileCompatibilityBit() { + return GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; + } + } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -44,10 +44,14 @@ private static final int XGL_CONTEXT_MINOR_VERSION_ARB = 0x2092; private static final int XGL_CONTEXT_LAYER_PLANE_ARB = 0x2093; private static final int XGL_CONTEXT_FLAGS_ARB = 0x2094; + private static final int XGL_CONTEXT_PROFILE_MASK_ARB = 0x9126; private static final int XGL_CONTEXT_DEBUG_BIT_ARB = 0x0001; private static final int XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002; + private static final int XGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; + private static final int XGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; + MacOSXContextAttribs() { } @@ -75,4 +79,16 @@ return XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } + public int getProfileMaskAttrib() { + return XGL_CONTEXT_PROFILE_MASK_ARB; + } + + public int getProfileCoreBit() { + return XGL_CONTEXT_CORE_PROFILE_BIT_ARB; + } + + public int getProfileCompatibilityBit() { + return XGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; + } + } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -42,10 +42,14 @@ private static final int WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092; private static final int WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093; private static final int WGL_CONTEXT_FLAGS_ARB = 0x2094; + private static final int WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126; private static final int WGL_CONTEXT_DEBUG_BIT_ARB = 0x0001; private static final int WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002; + private static final int WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; + private static final int WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; + WindowsContextAttribs() { } @@ -73,4 +77,16 @@ return WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } + public int getProfileMaskAttrib() { + return WGL_CONTEXT_PROFILE_MASK_ARB; + } + + public int getProfileCoreBit() { + return WGL_CONTEXT_CORE_PROFILE_BIT_ARB; + } + + public int getProfileCompatibilityBit() { + return WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; + } + } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -48,17 +48,23 @@ if (!(field_type instanceof PrimitiveType)) throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type"); PrimitiveType field_type_prim = (PrimitiveType)field_type; - if (field_type_prim.getKind() != PrimitiveType.Kind.INT) - throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int'"); - Integer field_value = (Integer)field.getConstantValue(); + if (field_type_prim.getKind() != PrimitiveType.Kind.INT && field_type_prim.getKind() != PrimitiveType.Kind.LONG) + throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int' or 'long'"); + Object field_value = field.getConstantValue(); if (field_value == null) throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); } private static void generateField(PrintWriter writer, FieldDeclaration field) { - Integer field_value = (Integer)field.getConstantValue(); validateField(field); - String field_value_string = Integer.toHexString(field_value); + + Object value = field.getConstantValue(); + String field_value_string; + if ( value.getClass().equals(Integer.class) ) + field_value_string = Integer.toHexString((Integer)field.getConstantValue()); + else + field_value_string = Long.toHexString((Long)field.getConstantValue()) + 'l'; + Utils.printDocComment(writer, field); // Print field declaration writer.println("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = 0x" + field_value_string + ";"); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -41,14 +41,16 @@ * $Id$ */ -import com.sun.mirror.declaration.*; -import com.sun.mirror.type.*; - -import java.io.*; -import java.util.*; +import java.io.PrintWriter; import java.nio.*; +import java.util.HashMap; +import java.util.Map; +import com.sun.mirror.declaration.AnnotationMirror; +import com.sun.mirror.type.PrimitiveType; + public class GLTypeMap implements TypeMap { + private static final Map<Class, PrimitiveType.Kind> native_types_to_primitive; static { @@ -78,11 +80,14 @@ native_types_to_primitive.put(GLvoid.class, PrimitiveType.Kind.BYTE); native_types_to_primitive.put(GLint64EXT.class, PrimitiveType.Kind.LONG); native_types_to_primitive.put(GLuint64EXT.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLint64.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint64.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLsync.class, PrimitiveType.Kind.LONG); } public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) { PrimitiveType.Kind kind = native_types_to_primitive.get(native_type); - if (kind == null) + if ( kind == null ) throw new RuntimeException("Unsupported type " + native_type); return kind; } @@ -96,50 +101,46 @@ } public Signedness getSignednessFromType(Class type) { - if (GLuint.class.equals(type)) + if ( GLuint.class.equals(type) ) return Signedness.UNSIGNED; - else if (GLint.class.equals(type)) + else if ( GLint.class.equals(type) ) return Signedness.SIGNED; - else if (GLushort.class.equals(type)) + else if ( GLushort.class.equals(type) ) return Signedness.UNSIGNED; - else if (GLshort.class.equals(type)) + else if ( GLshort.class.equals(type) ) return Signedness.SIGNED; - else if (GLubyte.class.equals(type)) + else if ( GLubyte.class.equals(type) ) return Signedness.UNSIGNED; - else if (GLbyte.class.equals(type)) + else if ( GLbyte.class.equals(type) ) return Signedness.SIGNED; - else if (GLuint64EXT.class.equals(type)) + else if ( GLuint64EXT.class.equals(type) ) return Signedness.UNSIGNED; - else if (GLint64EXT.class.equals(type)) + else if ( GLint64EXT.class.equals(type) ) return Signedness.SIGNED; + else if ( GLuint64.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLint64.class.equals(type) ) + return Signedness.SIGNED; else return Signedness.NONE; } public String translateAnnotation(Class annotation_type) { - if (annotation_type.equals(GLuint.class)) + if ( annotation_type.equals(GLuint.class) || annotation_type.equals(GLint.class) ) return "i"; - else if (annotation_type.equals(GLint.class)) - return "i"; - else if (annotation_type.equals(GLushort.class)) - return"s"; - else if (annotation_type.equals(GLshort.class)) + else if ( annotation_type.equals(GLushort.class) || annotation_type.equals(GLshort.class) ) return "s"; - else if (annotation_type.equals(GLubyte.class)) + else if ( annotation_type.equals(GLubyte.class) || annotation_type.equals(GLbyte.class) ) return "b"; - else if (annotation_type.equals(GLbyte.class)) - return "b"; - else if (annotation_type.equals(GLfloat.class)) + else if ( annotation_type.equals(GLfloat.class) ) return "f"; - else if (annotation_type.equals(GLdouble.class)) + else if ( annotation_type.equals(GLdouble.class) ) return "d"; - else if (annotation_type.equals(GLhalf.class)) + else if ( annotation_type.equals(GLhalf.class) ) return "h"; - else if (annotation_type.equals(GLuint64EXT.class)) + else if ( annotation_type.equals(GLuint64EXT.class) || annotation_type.equals(GLint64EXT.class) || annotation_type.equals(GLuint64.class) || annotation_type.equals(GLint64.class) ) return "i64"; - else if (annotation_type.equals(GLint64EXT.class)) - return "i64"; - else if (annotation_type.equals(GLboolean.class) || annotation_type.equals(GLvoid.class)) + else if ( annotation_type.equals(GLboolean.class) || annotation_type.equals(GLvoid.class) ) return ""; else throw new RuntimeException(annotation_type + " is not allowed"); @@ -147,7 +148,7 @@ public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) { Class type; - switch (kind) { + switch ( kind ) { case INT: type = GLint.class; break; @@ -184,43 +185,43 @@ } 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}; - else if (type.equals(FloatBuffer.class)) - return new Class[]{GLclampf.class, GLfloat.class}; - else if (type.equals(ByteBuffer.class)) - return new Class[]{GLboolean.class, GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class, GLvoid.class}; - else if (type.equals(ShortBuffer.class)) - return new Class[]{GLhalf.class, GLshort.class, GLushort.class}; - else if (type.equals(DoubleBuffer.class)) - return new Class[]{GLclampd.class, GLdouble.class}; - else if (type.equals(LongBuffer.class)) - return new Class[]{GLint64EXT.class, GLuint64EXT.class}; + if ( type.equals(IntBuffer.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, + GLsizei.class, GLuint.class }; + else if ( type.equals(FloatBuffer.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(ByteBuffer.class) ) + return new Class[] { GLboolean.class, GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class, GLvoid.class }; + else if ( type.equals(ShortBuffer.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(DoubleBuffer.class) ) + return new Class[] { GLclampd.class, GLdouble.class }; + else if ( type.equals(LongBuffer.class) ) + return new Class[] { GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class, GLsync.class }; else - return new Class[]{}; + return new Class[] { }; } private static Class[] getValidPrimitiveTypes(Class type) { - if (type.equals(long.class)) - return new Class[]{GLintptrARB.class, GLuint.class, GLintptr.class, GLsizeiptrARB.class, GLsizeiptr.class, GLint64EXT.class, GLuint64EXT.class}; - else if (type.equals(int.class)) - return new Class[]{GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, GLuint.class, - GLsizei.class}; - else if (type.equals(double.class)) - return new Class[]{GLclampd.class, GLdouble.class}; - else if (type.equals(float.class)) - return new Class[]{GLclampf.class, GLfloat.class}; - else if (type.equals(short.class)) - return new Class[]{GLhalf.class, GLshort.class, GLushort.class}; - else if (type.equals(byte.class)) - return new Class[]{GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class}; - else if (type.equals(boolean.class)) - return new Class[]{GLboolean.class}; - else if (type.equals(void.class)) - return new Class[]{GLvoid.class}; + if ( type.equals(long.class) ) + return new Class[] { GLintptrARB.class, GLuint.class, GLintptr.class, GLsizeiptrARB.class, GLsizeiptr.class, GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class, GLsync.class }; + else if ( type.equals(int.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, GLuint.class, + GLsizei.class }; + else if ( type.equals(double.class) ) + return new Class[] { GLclampd.class, GLdouble.class }; + else if ( type.equals(float.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(short.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(byte.class) ) + return new Class[] { GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class }; + else if ( type.equals(boolean.class) ) + return new Class[] { GLboolean.class }; + else if ( type.equals(void.class) ) + return new Class[] { GLvoid.class }; else - return new Class[]{}; + return new Class[] { }; } public String getTypedefPrefix() { @@ -233,55 +234,59 @@ public Class[] getValidAnnotationTypes(Class type) { Class[] valid_types; - if (Buffer.class.isAssignableFrom(type)) + if ( Buffer.class.isAssignableFrom(type) ) valid_types = getValidBufferTypes(type); - else if (type.isPrimitive()) + else if ( type.isPrimitive() ) valid_types = getValidPrimitiveTypes(type); - else if (String.class.equals(type)) - valid_types = new Class[]{GLubyte.class}; + else if ( String.class.equals(type) ) + valid_types = new Class[] { GLubyte.class }; else - valid_types = new Class[]{}; + valid_types = new Class[] { }; return valid_types; } public Class getInverseType(Class type) { - if (GLuint.class.equals(type)) + if ( GLuint.class.equals(type) ) return GLint.class; - else if (GLint.class.equals(type)) + else if ( GLint.class.equals(type) ) return GLuint.class; - else if (GLushort.class.equals(type)) + else if ( GLushort.class.equals(type) ) return GLshort.class; - else if (GLshort.class.equals(type)) + else if ( GLshort.class.equals(type) ) return GLushort.class; - else if (GLubyte.class.equals(type)) + else if ( GLubyte.class.equals(type) ) return GLbyte.class; - else if (GLbyte.class.equals(type)) + else if ( GLbyte.class.equals(type) ) return GLubyte.class; - else if (GLuint64EXT.class.equals(type)) + else if ( GLuint64EXT.class.equals(type) ) return GLint64EXT.class; - else if (GLint64EXT.class.equals(type)) + else if ( GLint64EXT.class.equals(type) ) return GLuint64EXT.class; + else if ( GLuint64.class.equals(type) ) + return GLint64.class; + else if ( GLint64.class.equals(type) ) + return GLuint64.class; else return null; } public String getAutoTypeFromAnnotation(AnnotationMirror annotation) { Class annotation_class = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); - if (annotation_class.equals(GLint.class)) + if ( annotation_class.equals(GLint.class) ) return "GL11.GL_INT"; - else if (annotation_class.equals(GLbyte.class)) + else if ( annotation_class.equals(GLbyte.class) ) return "GL11.GL_BYTE"; - else if (annotation_class.equals(GLshort.class)) + else if ( annotation_class.equals(GLshort.class) ) return "GL11.GL_SHORT"; - if (annotation_class.equals(GLuint.class)) + if ( annotation_class.equals(GLuint.class) ) return "GL11.GL_UNSIGNED_INT"; - else if (annotation_class.equals(GLubyte.class)) + else if ( annotation_class.equals(GLubyte.class) ) return "GL11.GL_UNSIGNED_BYTE"; - else if (annotation_class.equals(GLushort.class)) + else if ( annotation_class.equals(GLushort.class) ) return "GL11.GL_UNSIGNED_SHORT"; - else if (annotation_class.equals(GLfloat.class)) + else if ( annotation_class.equals(GLfloat.class) ) return "GL11.GL_FLOAT"; - else if (annotation_class.equals(GLdouble.class)) + else if ( annotation_class.equals(GLdouble.class) ) return "GL11.GL_DOUBLE"; else return null; Modified: trunk/LWJGL/src/native/common/extgl.h =================================================================== --- trunk/LWJGL/src/native/common/extgl.h 2009-07-23 20:56:59 UTC (rev 3228) +++ trunk/LWJGL/src/native/common/extgl.h 2009-08-04 18:21:41 UTC (rev 3229) @@ -129,6 +129,9 @@ typedef unsigned short GLhalf; typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; /* helper stuff */ Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -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; + +import org.lwjgl.util.generator.GLenum; +import org.lwjgl.util.generator.GLuint; + +public interface AMD_draw_buffers_blend { + + void glBlendFuncIndexedAMD(@GLuint int buf, @GLenum int src, @GLenum int dst); + + void glBlendFuncSeparateIndexedAMD(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, + @GLenum int srcAlpha, @GLenum int dstAlpha); + + void glBlendEquationIndexedAMD(@GLuint int buf, @GLenum int mode); + + void glBlendEquationSeparateIndexedAMD(@GLuint int buf, @GLenum int modeRGB, + @GLenum int modeAlpha); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,43 @@ +/* + * 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_depth_clamp { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_DEPTH_CLAMP = 0x864F; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -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.opengl; + +import org.lwjgl.util.generator.GLenum; +import org.lwjgl.util.generator.GLuint; + +public interface ARB_draw_buffers_blend { + + void glBlendEquationiARB(@GLuint int buf, @GLenum int mode); + + void glBlendEquationSeparateiARB(@GLuint int buf, @GLenum int modeRGB, @GLenum int modeAlpha); + + void glBlendFunciARB(@GLuint int buf, @GLenum int src, @GLenum int dst); + + void glBlendFuncSeparateiARB(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, @GLenum int srcAlpha, @GLenum int dstAlpha); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -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.*; + +import java.nio.Buffer; + +public interface ARB_draw_elements_base_vertex { + + void glDrawElementsBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + void glDrawRangeElementsBaseVertex(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + void glDrawElementsInstancedBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount, int basevertex); + + //void glMultiDrawElementsBaseVertex(@GLenum int mode, @GLsizei*count, @GLenum int type, void**indices, @GLsizei int primcount, int*basevertex) + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -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_fragment_coord_conventions { +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,51 @@ +/* + * 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.GLenum; + +public interface ARB_provoking_vertex { + + /** Accepted by the <mode> parameter of ProvokingVertex: */ + int GL_FIRST_VERTEX_CONVENTION = 0x8E4D; + int GL_LAST_VERTEX_CONVENTION = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROVOKING_VERTEX = 0x8E4F; + int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + + void glProvokingVertex(@GLenum int mode); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sample_shading.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sample_shading.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sample_shading.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,53 @@ +/* + * 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.GLclampf; + +public interface ARB_sample_shading { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_SAMPLE_SHADING_ARB = 0x8C36; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + int GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37; + + void glMinSampleShadingARB(@GLclampf float value); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,43 @@ +/* + * 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_seamless_cube_map { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -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_texture_lod { +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,93 @@ +/* + * 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 java.nio.LongBuffer; + +@Extension(postfix = "") +public interface ARB_sync { + + /** Accepted as the <pname> parameter of GetInteger64v: */ + int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + + /** Accepted as the <pname> parameter of GetSynciv: */ + int GL_OBJECT_TYPE = 0x9112; + int GL_SYNC_CONDITION = 0x9113; + int GL_SYNC_STATUS = 0x9114; + int GL_SYNC_FLAGS = 0x9115; + + /** Returned in <values> for GetSynciv <pname> OBJECT_TYPE: */ + int GL_SYNC_FENCE = 0x9116; + + /** Returned in <values> for GetSynciv <pname> SYNC_CONDITION: */ + int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + + /** Returned in <values> for GetSynciv <pname> SYNC_STATUS: */ + int GL_UNSIGNALED = 0x9118; + int GL_SIGNALED = 0x9119; + + /** Accepted in the <flags> parameter of ClientWaitSync: */ + int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + + /** Accepted in the <timeout> parameter of WaitSync: */ + long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by ClientWaitSync: */ + int GL_ALREADY_SIGNALED = 0x911A; + int GL_TIMEOUT_EXPIRED = 0x911B; + int GL_CONDITION_SATISFIED = 0x911C; + int GL_WAIT_FAILED = 0x911D; + + @GLsync + long glFenceSync(@GLenum int condition, @GLbitfield int flags); + + boolean glIsSync(@GLsync long sync); + + void glDeleteSync(@GLsync long sync); + + @GLenum + int glClientWaitSync(@GLsync long sync, @GLbitfield int flags, @GLuint64 long timeout); + + void glWaitSync(@GLsync long sync, @GLbitfield int flags, @GLuint64 long timeout); + + @StripPostfix("params") + void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + + void glGetSynciv(@GLsync long sync, @GLenum int pname, + @AutoSize("values") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter IntBuffer values); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,65 @@ +/* + * 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_texture_cube_map_array { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap: + * <p/> + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + * <p/> + * Accepted by the <tex> parameter of GetTexImage: + */ + int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + */ + int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C; + int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D; + int GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E; + int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_gather.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_gather.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_gather.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,44 @@ +/* + * 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_texture_gather { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E; + int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F; + int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java 2009-08-04 18:21:41 UTC (rev 3229) @@ -0,0 +1,111 @@ +/* + * 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... [truncated message content] |