Package list lwjgl / cb1276c
drop files deleted upstream Michael Gilbert 10 years ago
52 changed file(s) with 0 addition(s) and 3755 deletion(s). Raw diff Collapse all Expand all
+0
-59
src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java less more
0 package org.lwjgl.opengl;
1
2 import org.lwjgl.opengl.AMDDebugOutputCallback.Handler;
3
4 import java.nio.ByteBuffer;
5 import java.util.Map;
6 import java.util.WeakHashMap;
7
8 /**
9 * This class handles AMDDebugOutputCallback.Handler registration and notification.
10 * We could have put this in AMDDebugOutputCallback, but we need to compile it for
11 * the generator. Registration is done reflectively in the AMDDebugOutputCallback
12 * constructor.
13 *
14 * @author Spasi
15 */
16 final class AMDDebugOutputUtil {
17
18 private static final Map handlers = new WeakHashMap();
19
20 private AMDDebugOutputUtil() {}
21
22 public static void registerHandler(final Handler handler) {
23 final Context ctx = Context.getCurrentContext();
24 if ( ctx == null )
25 throw new IllegalStateException("No context is current.");
26
27 if ( !ctx.getContextAttribs().isDebug() )
28 throw new IllegalStateException("The current context is not a debug context.");
29
30 if ( !GLContext.getCapabilities().GL_AMD_debug_output )
31 throw new IllegalStateException("AMD_debug_output is not supported.");
32
33 handlers.put(ctx, handler);
34 }
35
36 /**
37 * This method is called by native code. If finds the callback handler associated
38 * with the current Thread and calls its {@code handleMessage} method.
39 *
40 * @param id the message ID
41 * @param category the message category
42 * @param severity the message severity
43 * @param message the string representation of the message.
44 * @param userParam the user-specified data specified in glDebugMessageCallbackAMD. For the current implementation this is always null and we ignore it.
45 */
46 private static void messageCallback(final int id, final int category, final int severity, final String message, final ByteBuffer userParam) {
47 synchronized ( GlobalLock.lock ) {
48 final Context ctx = Context.getCurrentContext();
49 if ( ctx == null )
50 return;
51
52 final Handler handler = (Handler)handlers.get(ctx);
53 if ( handler != null )
54 handler.handleMessage(id, category, severity, message);
55 }
56 }
57
58 }
+0
-355
src/java/org/lwjgl/opengl/APIUtils.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.opengl;
32
33 import org.lwjgl.BufferUtils;
34
35 import java.nio.*;
36 import java.nio.charset.Charset;
37 import java.nio.charset.CharsetEncoder;
38
39 /** @author spasi */
40 final class APIUtils {
41
42 private static final int INITIAL_BUFFER_SIZE = 256;
43 private static final int INITIAL_LENGTHS_SIZE = 4;
44
45 private static final int BUFFERS_SIZE = 32;
46
47 private static final ThreadLocal arrayTL = new ThreadLocal() {
48 protected Object initialValue() { return new char[INITIAL_BUFFER_SIZE]; }
49 };
50
51 private static final ThreadLocal bufferTL = new ThreadLocal() {
52 protected Object initialValue() { return BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE); }
53 };
54
55 private static final ThreadLocal lengthsTL = new ThreadLocal() {
56 protected Object initialValue() { return BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE); }
57 };
58
59 private static final ThreadLocal infiniteSeqTL = new ThreadLocal() {
60 protected Object initialValue() { return new InfiniteCharSequence(); }
61 };
62
63 private static final ThreadLocal buffersTL = new ThreadLocal() {
64 protected Object initialValue() { return new Buffers(); }
65 };
66
67 private static CharsetEncoder encoder = Charset.forName("US-ASCII").newEncoder();
68
69 private APIUtils() {
70 }
71
72 private static char[] getArray(final int size) {
73 char[] array = (char[])arrayTL.get();
74
75 if ( array.length < size ) {
76 int sizeNew = array.length << 1;
77 while ( sizeNew < size )
78 sizeNew <<= 1;
79
80 array = new char[size];
81 arrayTL.set(array);
82 }
83
84 return array;
85 }
86
87 static ByteBuffer getBufferByte(final int size) {
88 ByteBuffer buffer = (ByteBuffer)bufferTL.get();
89
90 if ( buffer.capacity() < size ) {
91 int sizeNew = buffer.capacity() << 1;
92 while ( sizeNew < size )
93 sizeNew <<= 1;
94
95 buffer = BufferUtils.createByteBuffer(size);
96 bufferTL.set(buffer);
97 } else
98 buffer.clear();
99
100 return buffer;
101 }
102
103 private static ByteBuffer getBufferByteOffset(final int size) {
104 ByteBuffer buffer = (ByteBuffer)bufferTL.get();
105
106 if ( buffer.capacity() < size ) {
107 int sizeNew = buffer.capacity() << 1;
108 while ( sizeNew < size )
109 sizeNew <<= 1;
110
111 final ByteBuffer bufferNew = BufferUtils.createByteBuffer(size);
112 bufferNew.put(buffer);
113 bufferTL.set(buffer = bufferNew);
114 } else {
115 buffer.position(buffer.limit());
116 buffer.limit(buffer.capacity());
117 }
118
119 return buffer;
120 }
121
122 static ShortBuffer getBufferShort() { return ((Buffers)buffersTL.get()).shorts; }
123
124 static IntBuffer getBufferInt() { return ((Buffers)buffersTL.get()).ints; }
125
126 static LongBuffer getBufferLong() { return ((Buffers)buffersTL.get()).longs; }
127
128 static FloatBuffer getBufferFloat() { return ((Buffers)buffersTL.get()).floats; }
129
130 static DoubleBuffer getBufferDouble() { return ((Buffers)buffersTL.get()).doubles; }
131
132 static IntBuffer getLengths() {
133 return getLengths(1);
134 }
135
136 static IntBuffer getLengths(final int size) {
137 IntBuffer lengths = (IntBuffer)lengthsTL.get();
138
139 if ( lengths.capacity() < size ) {
140 int sizeNew = lengths.capacity();
141 while ( sizeNew < size )
142 sizeNew <<= 1;
143
144 lengths = BufferUtils.createIntBuffer(size);
145 lengthsTL.set(lengths);
146 } else
147 lengths.clear();
148
149 return lengths;
150 }
151
152 private static InfiniteCharSequence getInfiniteSeq() {
153 return (InfiniteCharSequence)infiniteSeqTL.get();
154 }
155
156 private static void encode(final ByteBuffer buffer, final CharSequence string) {
157 final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
158 infiniteSeq.setString(string);
159 encoder.encode(infiniteSeq.buffer, buffer, true);
160 infiniteSeq.clear();
161 }
162
163 /**
164 * Reads a byte string from the specified buffer.
165 *
166 * @param buffer
167 *
168 * @return the buffer as a String.
169 */
170 static String getString(final ByteBuffer buffer) {
171 final int length = buffer.remaining();
172 final char[] charArray = getArray(length);
173
174 for ( int i = buffer.position(); i < buffer.limit(); i++ )
175 charArray[i - buffer.position()] = (char)buffer.get(i);
176
177 return new String(charArray, 0, length);
178 }
179
180 /**
181 * Returns a buffer containing the specified string as bytes.
182 *
183 * @param string
184 *
185 * @return the String as a ByteBuffer
186 */
187 static ByteBuffer getBuffer(final CharSequence string) {
188 final ByteBuffer buffer = getBufferByte(string.length());
189
190 encode(buffer, string);
191
192 buffer.flip();
193 return buffer;
194 }
195
196 /**
197 * Returns a buffer containing the specified string as bytes, starting at the specified offset.
198 *
199 * @param string
200 *
201 * @return the String as a ByteBuffer
202 */
203 static ByteBuffer getBuffer(final CharSequence string, final int offset) {
204 final ByteBuffer buffer = getBufferByteOffset(offset + string.length());
205
206 encode(buffer, string);
207
208 buffer.flip();
209 return buffer;
210 }
211
212 /**
213 * Returns a buffer containing the specified string as bytes, including null-termination.
214 *
215 * @param string
216 *
217 * @return the String as a ByteBuffer
218 */
219 static ByteBuffer getBufferNT(final CharSequence string) {
220 final ByteBuffer buffer = getBufferByte(string.length() + 1);
221
222 encode(buffer, string);
223
224 buffer.put((byte)0);
225 buffer.flip();
226 return buffer;
227 }
228
229 static int getTotalLength(final CharSequence[] strings) {
230 int length = 0;
231 for ( int i = 0; i < strings.length; i++ )
232 length += strings[i].length();
233
234 return length;
235 }
236
237 /**
238 * Returns a buffer containing the specified strings as bytes.
239 *
240 * @param strings
241 *
242 * @return the Strings as a ByteBuffer
243 */
244 static ByteBuffer getBuffer(final CharSequence[] strings) {
245 final ByteBuffer buffer = getBufferByte(getTotalLength(strings));
246
247 final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
248 for ( int i = 0; i < strings.length; i++ ) {
249 infiniteSeq.setString(strings[i]);
250 encoder.encode(infiniteSeq.buffer, buffer, true);
251 }
252 infiniteSeq.clear();
253
254 buffer.flip();
255 return buffer;
256 }
257
258 /**
259 * Returns a buffer containing the specified strings as bytes, including null-termination.
260 *
261 * @param strings
262 *
263 * @return the Strings as a ByteBuffer
264 */
265 static ByteBuffer getBufferNT(final CharSequence[] strings) {
266 final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length);
267
268 final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
269 for ( int i = 0; i < strings.length; i++ ) {
270 infiniteSeq.setString(strings[i]);
271 encoder.encode(infiniteSeq.buffer, buffer, true);
272 buffer.put((byte)0);
273 }
274 infiniteSeq.clear();
275
276 buffer.flip();
277 return buffer;
278 }
279
280 /**
281 * Returns a buffer containing the lengths of the specified strings.
282 *
283 * @param strings
284 *
285 * @return the String lengths in an IntBuffer
286 */
287 static IntBuffer getLengths(final CharSequence[] strings) {
288 IntBuffer buffer = getLengths(strings.length);
289
290 for ( int i = 0; i < strings.length; i++ )
291 buffer.put(strings[i].length());
292
293 buffer.flip();
294 return buffer;
295 }
296
297 /**
298 * A mutable CharSequence with very large initial length. We can wrap this in a re-usable CharBuffer for decoding.
299 * We cannot subclass CharBuffer because of {@link CharBuffer#toString(int,int)}.
300 */
301 private static class InfiniteCharSequence implements CharSequence {
302
303 final CharBuffer buffer;
304
305 CharSequence string;
306
307 InfiniteCharSequence() {
308 buffer = CharBuffer.wrap(this);
309 }
310
311 void setString(final CharSequence string) {
312 this.string = string;
313 this.buffer.position(0);
314 this.buffer.limit(string.length());
315 }
316
317 void clear() {
318 this.string = null;
319 }
320
321 public int length() {
322 return Integer.MAX_VALUE;
323 }
324
325 public char charAt(final int index) {
326 return string.charAt(index);
327 }
328
329 public CharSequence subSequence(final int start, final int end) {
330 return string.subSequence(start, end);
331 }
332 }
333
334 private static class Buffers {
335
336 final ShortBuffer shorts;
337 final IntBuffer ints;
338 final LongBuffer longs;
339
340 final FloatBuffer floats;
341 final DoubleBuffer doubles;
342
343 Buffers() {
344 shorts = BufferUtils.createShortBuffer(BUFFERS_SIZE);
345 ints = BufferUtils.createIntBuffer(BUFFERS_SIZE);
346 longs = BufferUtils.createLongBuffer(BUFFERS_SIZE);
347
348 floats = BufferUtils.createFloatBuffer(BUFFERS_SIZE);
349 doubles = BufferUtils.createDoubleBuffer(BUFFERS_SIZE);
350 }
351
352 }
353
354 }
+0
-39
src/java/org/lwjgl/opengl/PointerWrapper.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.opengl;
32
33 /** @author spasi <spasi@users.sourceforge.net> */
34 public interface PointerWrapper {
35
36 long getPointer();
37
38 }
+0
-218
src/java/org/lwjgl/util/generator/ALTypeMap.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 package org.lwjgl.util.generator;
33
34 /**
35 *
36 * The OpenAL specific generator behaviour
37 *
38 * @author elias_naur <elias_naur@users.sourceforge.net>
39 * @version $Revision: 2983 $
40 * $Id: ALTypeMap.java 2983 2008-04-07 18:36:09Z matzon $
41 */
42
43 import com.sun.mirror.declaration.*;
44 import com.sun.mirror.type.*;
45
46 import java.io.*;
47 import java.util.*;
48 import java.nio.*;
49
50 public class ALTypeMap implements TypeMap {
51 private static final Map<Class, PrimitiveType.Kind> native_types_to_primitive;
52
53 static {
54 native_types_to_primitive = new HashMap<Class, PrimitiveType.Kind>();
55 native_types_to_primitive.put(ALboolean.class, PrimitiveType.Kind.BOOLEAN);
56 native_types_to_primitive.put(ALbyte.class, PrimitiveType.Kind.BYTE);
57 native_types_to_primitive.put(ALenum.class, PrimitiveType.Kind.INT);
58 native_types_to_primitive.put(ALfloat.class, PrimitiveType.Kind.FLOAT);
59 native_types_to_primitive.put(ALdouble.class, PrimitiveType.Kind.DOUBLE);
60 native_types_to_primitive.put(ALint.class, PrimitiveType.Kind.INT);
61 native_types_to_primitive.put(ALshort.class, PrimitiveType.Kind.SHORT);
62 native_types_to_primitive.put(ALsizei.class, PrimitiveType.Kind.INT);
63 native_types_to_primitive.put(ALubyte.class, PrimitiveType.Kind.BYTE);
64 native_types_to_primitive.put(ALuint.class, PrimitiveType.Kind.INT);
65 native_types_to_primitive.put(ALvoid.class, PrimitiveType.Kind.BYTE);
66 }
67
68 public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) {
69 PrimitiveType.Kind kind = native_types_to_primitive.get(native_type);
70 if (kind == null)
71 throw new RuntimeException("Unsupported type " + native_type);
72 return kind;
73 }
74
75 public Signedness getSignednessFromType(Class type) {
76 if (ALuint.class.equals(type))
77 return Signedness.UNSIGNED;
78 else if (ALint.class.equals(type))
79 return Signedness.SIGNED;
80 else if (ALshort.class.equals(type))
81 return Signedness.SIGNED;
82 else if (ALbyte.class.equals(type))
83 return Signedness.SIGNED;
84 else
85 return Signedness.NONE;
86 }
87
88 public String translateAnnotation(Class annotation_type) {
89 if (annotation_type.equals(ALuint.class))
90 return "i";
91 else if (annotation_type.equals(ALint.class))
92 return "i";
93 else if (annotation_type.equals(ALshort.class))
94 return "s";
95 else if (annotation_type.equals(ALbyte.class))
96 return "b";
97 else if (annotation_type.equals(ALfloat.class))
98 return "f";
99 else if (annotation_type.equals(ALdouble.class))
100 return "d";
101 else if (annotation_type.equals(ALboolean.class) || annotation_type.equals(ALvoid.class))
102 return "";
103 else
104 throw new RuntimeException(annotation_type + " is not allowed");
105 }
106
107 public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) {
108 Class type;
109 switch (kind) {
110 case INT:
111 type = ALint.class;
112 break;
113 case FLOAT:
114 type = ALfloat.class;
115 break;
116 case DOUBLE:
117 type = ALdouble.class;
118 break;
119 case SHORT:
120 type = ALshort.class;
121 break;
122 case BYTE:
123 type = ALbyte.class;
124 break;
125 case BOOLEAN:
126 type = ALboolean.class;
127 break;
128 default:
129 throw new RuntimeException(kind + " is not allowed");
130 }
131 return type;
132 }
133
134 private static Class[] getValidBufferTypes(Class type) {
135 if (type.equals(IntBuffer.class))
136 return new Class[]{ALenum.class, ALint.class, ALsizei.class, ALuint.class};
137 else if (type.equals(FloatBuffer.class))
138 return new Class[]{ALfloat.class};
139 else if (type.equals(ByteBuffer.class))
140 return new Class[]{ALboolean.class, ALbyte.class, ALvoid.class};
141 else if (type.equals(ShortBuffer.class))
142 return new Class[]{ALshort.class};
143 else if (type.equals(DoubleBuffer.class))
144 return new Class[]{ALdouble.class};
145 else
146 return new Class[]{};
147 }
148
149 private static Class[] getValidPrimitiveTypes(Class type) {
150 if (type.equals(int.class))
151 return new Class[]{ALenum.class, ALint.class, ALsizei.class, ALuint.class};
152 else if (type.equals(double.class))
153 return new Class[]{ALdouble.class};
154 else if (type.equals(float.class))
155 return new Class[]{ALfloat.class};
156 else if (type.equals(short.class))
157 return new Class[]{ALshort.class};
158 else if (type.equals(byte.class))
159 return new Class[]{ALbyte.class};
160 else if (type.equals(boolean.class))
161 return new Class[]{ALboolean.class};
162 else if (type.equals(void.class))
163 return new Class[]{ALvoid.class};
164 else
165 return new Class[]{};
166 }
167
168 public String getErrorCheckMethodName() {
169 return "Util.checkALError()";
170 }
171
172 public String getRegisterNativesFunctionName() {
173 return "extal_InitializeClass";
174 }
175
176 public String getTypedefPrefix() {
177 return "ALAPIENTRY";
178 }
179
180 public void printNativeIncludes(PrintWriter writer) {
181 writer.println("#include \"extal.h\"");
182 }
183
184 public Class getStringElementType() {
185 return ALubyte.class;
186 }
187
188 public Class[] getValidAnnotationTypes(Class type) {
189 Class[] valid_types;
190 if (Buffer.class.isAssignableFrom(type))
191 valid_types = getValidBufferTypes(type);
192 else if (type.isPrimitive())
193 valid_types = getValidPrimitiveTypes(type);
194 else if (type.equals(String.class))
195 valid_types = new Class[]{ALubyte.class};
196 else
197 valid_types = new Class[]{};
198 return valid_types;
199 }
200
201 public Class getVoidType() {
202 return ALvoid.class;
203 }
204
205 public Class getInverseType(Class type) {
206 if (ALuint.class.equals(type))
207 return ALint.class;
208 else if (ALint.class.equals(type))
209 return ALuint.class;
210 else
211 return null;
212 }
213
214 public String getAutoTypeFromAnnotation(AnnotationMirror annotation) {
215 return null;
216 }
217 }
+0
-47
src/java/org/lwjgl/util/generator/ALboolean.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALboolean.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALboolean {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALbyte.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALbyte.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALbyte {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALdouble.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALdouble.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALdouble {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALenum.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALenum.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALenum {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALfloat.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALfloat.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALfloat {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALint.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALint.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALint {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALshort.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALshort.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALshort {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALsizei.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALsizei.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALsizei {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALubyte.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALubyte.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALubyte {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALuint.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALuint.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALuint {
46 }
+0
-47
src/java/org/lwjgl/util/generator/ALvoid.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: ALvoid.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface ALvoid {
46 }
+0
-50
src/java/org/lwjgl/util/generator/AutoResultSize.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * AutoResultSize specifies the size of a returned Buffer
36 * as an expression.
37 *
38 * @author elias_naur <elias_naur@users.sourceforge.net>
39 * @version $Revision: 2983 $
40 * $Id: AutoResultSize.java 2983 2008-04-07 18:36:09Z matzon $
41 */
42
43 import java.lang.annotation.Target;
44 import java.lang.annotation.ElementType;
45
46 @Target(ElementType.METHOD)
47 public @interface AutoResultSize {
48 String value(); // The size as a java expression
49 }
+0
-319
src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 package org.lwjgl.util.generator;
33
34 import java.io.PrintWriter;
35 import java.util.Arrays;
36 import java.util.Collection;
37 import java.util.EnumSet;
38 import java.util.Iterator;
39
40 import com.sun.mirror.declaration.InterfaceDeclaration;
41 import com.sun.mirror.declaration.MethodDeclaration;
42 import com.sun.mirror.type.InterfaceType;
43
44 /**
45 * Generator visitor for the context capabilities generator tool
46 *
47 * @author elias_naur <elias_naur@users.sourceforge.net>
48 * @version $Revision: 3355 $
49 * $Id: ContextCapabilitiesGenerator.java 3355 2010-05-27 22:56:29Z spasi $
50 */
51 public class ContextCapabilitiesGenerator {
52
53 private static final String STUBS_LOADED_NAME = "loaded_stubs";
54 private static final String ALL_INIT_METHOD_NAME = "initAllStubs";
55 private static final String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses";
56 private static final String CACHED_EXTS_VAR_NAME = "supported_extensions";
57 private static final String PROFILE_MASK_VAR_NAME = "profileMask";
58 private static final String EXTENSION_PREFIX = "GL_";
59 private static final String CORE_PREFIX = "Open";
60
61 public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) {
62 writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
63 writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";");
64 writer.println("\tfinal StateTracker tracker = new StateTracker();");
65 writer.println();
66 if ( !context_specific ) {
67 writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;");
68 }
69 }
70
71 public static void generateInitializerPrologue(PrintWriter writer) {
72 writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "(boolean forwardCompatible) throws LWJGLException {");
73 writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "(forwardCompatible);");
74 }
75
76 private static String translateFieldName(String interface_name) {
77 if ( interface_name.startsWith("GL") )
78 return CORE_PREFIX + interface_name;
79 else
80 return EXTENSION_PREFIX + interface_name;
81 }
82
83 public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) {
84 Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
85 if ( super_interfaces.size() > 1 )
86 throw new RuntimeException(d + " extends more than one other interface");
87 if ( super_interfaces.size() == 1 ) {
88 InterfaceType super_interface = super_interfaces.iterator().next();
89 writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\"");
90 writer.println(translateFieldName(d.getSimpleName()) + "\"))");
91 writer.print("\t\t\t");
92 generateAddExtension(writer, super_interface.getDeclaration());
93 }
94 }
95
96 public static void generateInitializer(PrintWriter writer, InterfaceDeclaration d) {
97 String translated_field_name = translateFieldName(d.getSimpleName());
98 writer.print("\t\tthis." + translated_field_name + " = ");
99 writer.print(CACHED_EXTS_VAR_NAME + ".contains(\"");
100 writer.print(translated_field_name + "\")");
101 Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
102 if ( super_interfaces.size() > 1 )
103 throw new RuntimeException(d + " extends more than one other interface");
104 if ( super_interfaces.size() == 1 ) {
105 InterfaceType super_interface = super_interfaces.iterator().next();
106 writer.println();
107 writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\"");
108 writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")");
109 }
110 Alias alias_annotation = d.getAnnotation(Alias.class);
111 if ( alias_annotation != null ) {
112 writer.println();
113 writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\"");
114 writer.print(translateFieldName(alias_annotation.value()) + "\")");
115 }
116 writer.println(";");
117 }
118
119 private static String getAddressesInitializerName(String class_name) {
120 return class_name + POINTER_INITIALIZER_POSTFIX;
121 }
122
123 public static void generateInitStubsPrologue(PrintWriter writer, boolean context_specific) {
124 writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "(boolean forwardCompatible) throws LWJGLException {");
125
126 // Load the basic pointers we need to detect OpenGL version and supported extensions.
127 writer.println("\t\tGL11_glGetError_pointer = GLContext.getFunctionAddress(\"glGetError\");");
128 writer.println("\t\tGL11_glGetString_pointer = GLContext.getFunctionAddress(\"glGetString\");");
129
130 // Initialize GL11.glGetIntegerv and GL30.glGetStringi here, in case we have created an OpenGL 3.0 context.
131 // (they will be used in GLContext.getSupportedExtensions)
132 writer.println("\t\tGL11_glGetIntegerv_pointer = GLContext.getFunctionAddress(\"glGetIntegerv\");");
133 writer.println("\t\tGL30_glGetStringi_pointer = GLContext.getFunctionAddress(\"glGetStringi\");");
134
135 // Get the supported extensions set.
136 writer.println("\t\tGLContext.setCapabilities(this);");
137 writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = new HashSet(256);");
138 writer.println("\t\tint " + PROFILE_MASK_VAR_NAME + " = GLContext.getSupportedExtensions(" + CACHED_EXTS_VAR_NAME + ");");
139
140 // Force forward compatible mode when OpenGL version is 3.1 or higher and ARB_compatibility is not available.
141 writer.println("\t\tif ( supported_extensions.contains(\"OpenGL31\") && !(supported_extensions.contains(\"GL_ARB_compatibility\") || (profileMask & GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0) )");
142 writer.println("\t\t\tforwardCompatible = true;");
143
144 if ( !context_specific ) {
145 writer.println("\t\tif (" + STUBS_LOADED_NAME + ")");
146 writer.println("\t\t\treturn GLContext.getSupportedExtensions();");
147 writer.println("\t\torg.lwjgl.opengl.GL11." + Utils.STUB_INITIALIZER_NAME + "();");
148 } else {
149 writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "(forwardCompatible))");
150 writer.println("\t\t\tthrow new LWJGLException(\"GL11 not supported\");");
151 }
152 }
153
154 public static void generateInitStubsEpilogue(PrintWriter writer, boolean context_specific) {
155 if ( !context_specific ) {
156 writer.println("\t\t" + STUBS_LOADED_NAME + " = true;");
157 }
158 writer.println("\t\treturn " + CACHED_EXTS_VAR_NAME + ";");
159 writer.println("\t}");
160 }
161
162 public static void generateUnloadStubs(PrintWriter writer, InterfaceDeclaration d) {
163 if ( d.getMethods().size() > 0 ) {
164 writer.print("\t\tGLContext.resetNativeStubs(" + Utils.getSimpleClassName(d));
165 writer.println(".class);");
166 }
167 }
168
169 public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d, boolean context_specific) {
170 if ( d.getMethods().size() > 0 ) {
171 if ( context_specific ) {
172 final Alias alias_annotation = d.getAnnotation(Alias.class);
173
174 if ( d.getAnnotation(ForceInit.class) != null )
175 writer.println("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"" + translateFieldName(d.getSimpleName()) + "\");");
176 writer.print("\t\tif (");
177 if ( alias_annotation != null )
178 writer.print("(");
179 writer.print(CACHED_EXTS_VAR_NAME + ".contains(\"");
180 writer.print(translateFieldName(d.getSimpleName()) + "\")");
181 if ( alias_annotation != null ) {
182 writer.print(" || " + CACHED_EXTS_VAR_NAME + ".contains(\"");
183 writer.print(translateFieldName(alias_annotation.value()) + "\"))");
184 }
185 writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "(");
186 if ( d.getAnnotation(DeprecatedGL.class) != null )
187 writer.print("forwardCompatible");
188 if ( d.getAnnotation(Dependent.class) != null ) {
189 if ( d.getAnnotation(DeprecatedGL.class) != null )
190 writer.print(",");
191 writer.print("supported_extensions");
192 }
193 if ( alias_annotation != null ) {
194 writer.println(")) {");
195 writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \"");
196 writer.println(translateFieldName(alias_annotation.value()) + "\");");
197 } else
198 writer.println("))");
199 writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \"");
200 writer.println(translateFieldName(d.getSimpleName()) + "\");");
201 if ( alias_annotation != null )
202 writer.println("\t\t}");
203 } else {
204 writer.print("\t\tGLContext." + Utils.STUB_INITIALIZER_NAME + "(" + Utils.getSimpleClassName(d));
205 writer.println(".class, " + CACHED_EXTS_VAR_NAME + ", \"" + translateFieldName(d.getSimpleName()) + "\");");
206 }
207 }
208 }
209
210 private static void generateAddExtension(PrintWriter writer, InterfaceDeclaration d) {
211 writer.print(CACHED_EXTS_VAR_NAME + ".add(\"");
212 writer.println(translateFieldName(d.getSimpleName()) + "\");");
213 }
214
215 public static void generateAddressesInitializers(PrintWriter writer, InterfaceDeclaration d) {
216 Iterator<? extends MethodDeclaration> methods = d.getMethods().iterator();
217 if ( !methods.hasNext() )
218 return;
219
220 writer.print("\tprivate boolean " + getAddressesInitializerName(d.getSimpleName()) + "(");
221
222 boolean optional;
223 boolean deprecated = d.getAnnotation(DeprecatedGL.class) != null;
224 Dependent dependent = d.getAnnotation(Dependent.class);
225 if ( deprecated )
226 writer.print("boolean forwardCompatible");
227 if ( dependent != null ) {
228 if ( deprecated )
229 writer.print(",");
230 writer.print("Set supported_extensions");
231 }
232
233 Alias alias_annotation = d.getAnnotation(Alias.class);
234 boolean aliased = alias_annotation != null && alias_annotation.postfix().length() > 0;
235
236 writer.println(") {");
237 writer.println("\t\treturn ");
238
239 boolean first = true;
240 while ( methods.hasNext() ) {
241 MethodDeclaration method = methods.next();
242 if ( method.getAnnotation(Alternate.class) != null )
243 continue;
244
245 if ( !first )
246 writer.println(" &");
247 else
248 first = false;
249
250 optional = method.getAnnotation(Optional.class) != null;
251 deprecated = method.getAnnotation(DeprecatedGL.class) != null;
252 dependent = method.getAnnotation(Dependent.class);
253
254 writer.print("\t\t\t(");
255 if ( optional )
256 writer.print('(');
257 if ( deprecated )
258 writer.print("forwardCompatible || ");
259 if ( dependent != null ) {
260 if ( dependent.value().indexOf(',') == -1 )
261 writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || ");
262 else {
263 writer.print("!(false");
264 for ( String extension : dependent.value().split(",") )
265 writer.print(" || supported_extensions.contains(\"" + extension + "\")");
266 writer.print(") || ");
267 }
268 }
269 if ( deprecated || dependent != null )
270 writer.print('(');
271 writer.print(Utils.getFunctionAddressName(d, method) + " = ");
272 PlatformDependent platform_dependent = method.getAnnotation(PlatformDependent.class);
273 if ( platform_dependent != null ) {
274 EnumSet<Platform> platform_set = EnumSet.copyOf(Arrays.asList(platform_dependent.value()));
275 writer.print("GLContext.getPlatformSpecificFunctionAddress(\"");
276 writer.print(Platform.ALL.getPrefix() + "\", ");
277 writer.print("new String[]{");
278 Iterator<Platform> platforms = platform_set.iterator();
279 while ( platforms.hasNext() ) {
280 writer.print("\"" + platforms.next().getOSPrefix() + "\"");
281 if ( platforms.hasNext() )
282 writer.print(", ");
283 }
284 writer.print("}, new String[]{");
285 platforms = platform_set.iterator();
286 while ( platforms.hasNext() ) {
287 writer.print("\"" + platforms.next().getPrefix() + "\"");
288 if ( platforms.hasNext() )
289 writer.print(", ");
290 }
291 writer.print("}, ");
292 } else if ( aliased ) {
293 writer.print("GLContext.getFunctionAddress(new String[] {\"" + method.getSimpleName() + "\",\"" + method.getSimpleName() + alias_annotation.postfix() + "\"})) != 0");
294 } else
295 writer.print("GLContext.getFunctionAddress(");
296 if ( !aliased )
297 writer.print("\"" + method.getSimpleName() + "\")) != 0");
298 if ( deprecated || dependent != null )
299 writer.print(')');
300 if ( optional )
301 writer.print(" || true)");
302 }
303 writer.println(";");
304 writer.println("\t}");
305 writer.println();
306 }
307
308 public static void generateSymbolAddresses(PrintWriter writer, InterfaceDeclaration d) {
309 for ( MethodDeclaration method : d.getMethods() ) {
310 if ( method.getAnnotation(Alternate.class) == null )
311 writer.println("\tlong " + Utils.getFunctionAddressName(d, method) + ";");
312 }
313 }
314
315 public static void generateField(PrintWriter writer, InterfaceDeclaration d) {
316 writer.println("\tpublic final boolean " + translateFieldName(d.getSimpleName()) + ";");
317 }
318 }
+0
-189
src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 package org.lwjgl.util.generator;
33
34 import static java.util.Collections.unmodifiableCollection;
35
36 import java.io.File;
37 import java.io.IOException;
38 import java.io.PrintWriter;
39 import java.util.Arrays;
40 import java.util.Collection;
41 import java.util.Map;
42 import java.util.Set;
43
44 import com.sun.mirror.apt.AnnotationProcessor;
45 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
46 import com.sun.mirror.apt.AnnotationProcessorFactory;
47 import com.sun.mirror.apt.AnnotationProcessors;
48 import com.sun.mirror.apt.Filer;
49 import com.sun.mirror.apt.RoundCompleteEvent;
50 import com.sun.mirror.apt.RoundCompleteListener;
51 import com.sun.mirror.declaration.AnnotationTypeDeclaration;
52 import com.sun.mirror.declaration.InterfaceDeclaration;
53 import com.sun.mirror.declaration.TypeDeclaration;
54 import com.sun.mirror.util.DeclarationFilter;
55
56 /**
57 *
58 * Generator tool for creating the ContexCapabilities class
59 *
60 * @author elias_naur <elias_naur@users.sourceforge.net>
61 * @version $Revision: 3316 $
62 * $Id: ContextGeneratorProcessorFactory.java 3316 2010-04-09 23:57:40Z spasi $
63 */
64 public class ContextGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener {
65 private static boolean first_round = true;
66
67 // Process any set of annotations
68 private static final Collection<String> supportedAnnotations =
69 unmodifiableCollection(Arrays.asList("*"));
70
71 public Collection<String> supportedAnnotationTypes() {
72 return supportedAnnotations;
73 }
74
75 public Collection<String> supportedOptions() {
76 return unmodifiableCollection(Arrays.asList("-Acontextspecific", "-Ageneratechecks"));
77 }
78
79 public void roundComplete(RoundCompleteEvent event) {
80 first_round = false;
81 }
82
83 public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
84 // Only process the initial types, not the generated ones
85 if (first_round) {
86 env.addListener(this);
87 return new GeneratorProcessor(env);
88 } else
89 return AnnotationProcessors.NO_OP;
90 }
91
92 private static class GeneratorProcessor implements AnnotationProcessor {
93 private final AnnotationProcessorEnvironment env;
94
95 GeneratorProcessor(AnnotationProcessorEnvironment env) {
96 this.env = env;
97 }
98
99 public void process() {
100 Map<String, String> options = env.getOptions();
101 boolean generate_error_checks = options.containsKey("-Ageneratechecks");
102 boolean context_specific = options.containsKey("-Acontextspecific");
103 try {
104 generateContextCapabilitiesSource(context_specific, generate_error_checks);
105 } catch (IOException e) {
106 throw new RuntimeException(e);
107 }
108 }
109
110 private void generateContextCapabilitiesSource(boolean context_specific, boolean generate_error_checks) throws IOException {
111 PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null);
112 writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
113 writer.println();
114 writer.println("package org.lwjgl.opengl;");
115 writer.println();
116 writer.println("import org.lwjgl.LWJGLException;");
117 writer.println("import org.lwjgl.LWJGLUtil;");
118 writer.println("import org.lwjgl.BufferUtils;");
119 writer.println("import java.util.Set;");
120 writer.println("import java.util.HashSet;");
121 writer.println("import java.nio.IntBuffer;");
122 writer.println();
123 ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific, generate_error_checks);
124 DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
125 Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations());
126 for (TypeDeclaration typedecl : interface_decls) {
127 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
128 if (Utils.isFinal(interface_decl))
129 ContextCapabilitiesGenerator.generateField(writer, interface_decl);
130 }
131 writer.println();
132 for (TypeDeclaration typedecl : interface_decls) {
133 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
134 ContextCapabilitiesGenerator.generateSymbolAddresses(writer, interface_decl);
135 }
136 writer.println();
137 if (context_specific) {
138 for (TypeDeclaration typedecl : interface_decls) {
139 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
140 ContextCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl);
141 }
142 writer.println();
143 }
144
145 writer.println("\tprivate static void remove(Set supported_extensions, String extension) {");
146 writer.println("\t\tLWJGLUtil.log(extension + \" was reported as available but an entry point is missing\");");
147 writer.println("\t\tsupported_extensions.remove(extension);");
148 writer.println("\t}\n");
149
150 ContextCapabilitiesGenerator.generateInitStubsPrologue(writer, context_specific);
151 for (TypeDeclaration typedecl : interface_decls) {
152 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
153 ContextCapabilitiesGenerator.generateSuperClassAdds(writer, interface_decl);
154 }
155 for (TypeDeclaration typedecl : interface_decls) {
156 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
157 String simple_name = interface_decl.getSimpleName();
158 if (simple_name.equals("GL11"))
159 continue;
160 ContextCapabilitiesGenerator.generateInitStubs(writer, interface_decl, context_specific);
161 }
162 ContextCapabilitiesGenerator.generateInitStubsEpilogue(writer, context_specific);
163 writer.println();
164 writer.println("\tstatic void unloadAllStubs() {");
165 if (!context_specific) {
166 writer.println("\t\tif (!loaded_stubs)");
167 writer.println("\t\t\treturn;");
168 for (TypeDeclaration typedecl : interface_decls) {
169 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
170 ContextCapabilitiesGenerator.generateUnloadStubs(writer, interface_decl);
171 }
172 writer.println("\t\tloaded_stubs = false;");
173 }
174 writer.println("\t}");
175 writer.println();
176 ContextCapabilitiesGenerator.generateInitializerPrologue(writer);
177 for (TypeDeclaration typedecl : interface_decls) {
178 InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
179 if (Utils.isFinal(interface_decl))
180 ContextCapabilitiesGenerator.generateInitializer(writer, interface_decl);
181 }
182 writer.println("\t\ttracker.init();");
183 writer.println("\t}");
184 writer.println("}");
185 writer.close();
186 }
187 }
188 }
+0
-299
src/java/org/lwjgl/util/generator/GLTypeMap.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 package org.lwjgl.util.generator;
33
34 /**
35 *
36 * OpenGL sepcific generator behaviour
37 *
38 * @author elias_naur <elias_naur@users.sourceforge.net>
39 * @version $Revision: 3287 $
40 * $Id: GLTypeMap.java 3287 2010-03-14 23:24:40Z spasi $
41 */
42
43 import org.lwjgl.opengl.PointerWrapper;
44
45 import java.io.PrintWriter;
46 import java.nio.*;
47 import java.util.HashMap;
48 import java.util.Map;
49
50 import com.sun.mirror.declaration.AnnotationMirror;
51 import com.sun.mirror.type.PrimitiveType;
52
53 public class GLTypeMap implements TypeMap {
54
55 private static final Map<Class, PrimitiveType.Kind> native_types_to_primitive;
56
57 static {
58 native_types_to_primitive = new HashMap<Class, PrimitiveType.Kind>();
59 native_types_to_primitive.put(GLbitfield.class, PrimitiveType.Kind.INT);
60 native_types_to_primitive.put(GLcharARB.class, PrimitiveType.Kind.BYTE);
61 native_types_to_primitive.put(GLclampf.class, PrimitiveType.Kind.FLOAT);
62 native_types_to_primitive.put(GLfloat.class, PrimitiveType.Kind.FLOAT);
63 native_types_to_primitive.put(GLint.class, PrimitiveType.Kind.INT);
64 native_types_to_primitive.put(GLshort.class, PrimitiveType.Kind.SHORT);
65 native_types_to_primitive.put(GLsizeiptr.class, PrimitiveType.Kind.LONG);
66 native_types_to_primitive.put(GLuint.class, PrimitiveType.Kind.INT);
67 native_types_to_primitive.put(GLboolean.class, PrimitiveType.Kind.BOOLEAN);
68 native_types_to_primitive.put(GLchar.class, PrimitiveType.Kind.BYTE);
69 native_types_to_primitive.put(GLdouble.class, PrimitiveType.Kind.DOUBLE);
70 native_types_to_primitive.put(GLhalf.class, PrimitiveType.Kind.SHORT);
71 native_types_to_primitive.put(GLintptrARB.class, PrimitiveType.Kind.LONG);
72 native_types_to_primitive.put(GLsizei.class, PrimitiveType.Kind.INT);
73 native_types_to_primitive.put(GLushort.class, PrimitiveType.Kind.SHORT);
74 native_types_to_primitive.put(GLbyte.class, PrimitiveType.Kind.BYTE);
75 native_types_to_primitive.put(GLclampd.class, PrimitiveType.Kind.DOUBLE);
76 native_types_to_primitive.put(GLenum.class, PrimitiveType.Kind.INT);
77 native_types_to_primitive.put(GLhandleARB.class, PrimitiveType.Kind.INT);
78 native_types_to_primitive.put(GLintptr.class, PrimitiveType.Kind.LONG);
79 native_types_to_primitive.put(GLsizeiptrARB.class, PrimitiveType.Kind.LONG);
80 native_types_to_primitive.put(GLubyte.class, PrimitiveType.Kind.BYTE);
81 native_types_to_primitive.put(GLvoid.class, PrimitiveType.Kind.BYTE);
82 native_types_to_primitive.put(GLint64EXT.class, PrimitiveType.Kind.LONG);
83 native_types_to_primitive.put(GLuint64EXT.class, PrimitiveType.Kind.LONG);
84 native_types_to_primitive.put(GLint64.class, PrimitiveType.Kind.LONG);
85 native_types_to_primitive.put(GLuint64.class, PrimitiveType.Kind.LONG);
86 }
87
88 public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) {
89 PrimitiveType.Kind kind = native_types_to_primitive.get(native_type);
90 if ( kind == null )
91 throw new RuntimeException("Unsupported type " + native_type);
92 return kind;
93 }
94
95 public String getErrorCheckMethodName() {
96 return "Util.checkGLError()";
97 }
98
99 public String getRegisterNativesFunctionName() {
100 return "extgl_InitializeClass";
101 }
102
103 public Signedness getSignednessFromType(Class type) {
104 if ( GLuint.class.equals(type) )
105 return Signedness.UNSIGNED;
106 else if ( GLint.class.equals(type) )
107 return Signedness.SIGNED;
108 else if ( GLushort.class.equals(type) )
109 return Signedness.UNSIGNED;
110 else if ( GLshort.class.equals(type) )
111 return Signedness.SIGNED;
112 else if ( GLubyte.class.equals(type) )
113 return Signedness.UNSIGNED;
114 else if ( GLbyte.class.equals(type) )
115 return Signedness.SIGNED;
116 else if ( GLuint64EXT.class.equals(type) )
117 return Signedness.UNSIGNED;
118 else if ( GLint64EXT.class.equals(type) )
119 return Signedness.SIGNED;
120 else if ( GLuint64.class.equals(type) )
121 return Signedness.UNSIGNED;
122 else if ( GLint64.class.equals(type) )
123 return Signedness.SIGNED;
124 else
125 return Signedness.NONE;
126 }
127
128 public String translateAnnotation(Class annotation_type) {
129 if ( annotation_type.equals(GLuint.class) || annotation_type.equals(GLint.class) )
130 return "i";
131 else if ( annotation_type.equals(GLushort.class) || annotation_type.equals(GLshort.class) )
132 return "s";
133 else if ( annotation_type.equals(GLubyte.class) || annotation_type.equals(GLbyte.class) )
134 return "b";
135 else if ( annotation_type.equals(GLfloat.class) )
136 return "f";
137 else if ( annotation_type.equals(GLdouble.class) )
138 return "d";
139 else if ( annotation_type.equals(GLhalf.class) )
140 return "h";
141 else if ( annotation_type.equals(GLuint64EXT.class) || annotation_type.equals(GLint64EXT.class) || annotation_type.equals(GLuint64.class) || annotation_type.equals(GLint64.class) )
142 return "i64";
143 else if ( annotation_type.equals(GLboolean.class) || annotation_type.equals(GLvoid.class) )
144 return "";
145 else
146 throw new RuntimeException(annotation_type + " is not allowed");
147 }
148
149 public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) {
150 Class type;
151 switch ( kind ) {
152 case INT:
153 type = GLint.class;
154 break;
155 case DOUBLE:
156 type = GLdouble.class;
157 break;
158 case FLOAT:
159 type = GLfloat.class;
160 break;
161 case SHORT:
162 type = GLshort.class;
163 break;
164 case BYTE:
165 type = GLbyte.class;
166 break;
167 case LONG:
168 type = GLint64EXT.class;
169 break;
170 case BOOLEAN:
171 type = GLboolean.class;
172 break;
173 default:
174 throw new RuntimeException(kind + " is not allowed");
175 }
176 return type;
177 }
178
179 public Class getVoidType() {
180 return GLvoid.class;
181 }
182
183 public Class getStringElementType() {
184 return GLubyte.class;
185 }
186
187 private static Class[] getValidBufferTypes(Class type) {
188 if ( type.equals(IntBuffer.class) )
189 return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class,
190 GLsizei.class, GLuint.class, GLvoid.class };
191 else if ( type.equals(FloatBuffer.class) )
192 return new Class[] { GLclampf.class, GLfloat.class };
193 else if ( type.equals(ByteBuffer.class) )
194 return new Class[] { GLboolean.class, GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class, GLvoid.class };
195 else if ( type.equals(ShortBuffer.class) )
196 return new Class[] { GLhalf.class, GLshort.class, GLushort.class };
197 else if ( type.equals(DoubleBuffer.class) )
198 return new Class[] { GLclampd.class, GLdouble.class };
199 else if ( type.equals(LongBuffer.class) )
200 return new Class[] { GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class };
201 else
202 return new Class[] { };
203 }
204
205 private static Class[] getValidPrimitiveTypes(Class type) {
206 if ( type.equals(long.class) )
207 return new Class[] { GLintptrARB.class, GLuint.class, GLintptr.class, GLsizeiptrARB.class, GLsizeiptr.class, GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class };
208 else if ( type.equals(int.class) )
209 return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, GLuint.class,
210 GLsizei.class };
211 else if ( type.equals(double.class) )
212 return new Class[] { GLclampd.class, GLdouble.class };
213 else if ( type.equals(float.class) )
214 return new Class[] { GLclampf.class, GLfloat.class };
215 else if ( type.equals(short.class) )
216 return new Class[] { GLhalf.class, GLshort.class, GLushort.class };
217 else if ( type.equals(byte.class) )
218 return new Class[] { GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class };
219 else if ( type.equals(boolean.class) )
220 return new Class[] { GLboolean.class };
221 else if ( type.equals(void.class) )
222 return new Class[] { GLvoid.class, GLreturn.class };
223 else
224 return new Class[] { };
225 }
226
227 public String getTypedefPrefix() {
228 return "APIENTRY";
229 }
230
231 public void printNativeIncludes(PrintWriter writer) {
232 writer.println("#include \"extgl.h\"");
233 }
234
235 public Class[] getValidAnnotationTypes(Class type) {
236 Class[] valid_types;
237 if ( Buffer.class.isAssignableFrom(type) )
238 valid_types = getValidBufferTypes(type);
239 else if ( type.isPrimitive() )
240 valid_types = getValidPrimitiveTypes(type);
241 else if ( String.class.equals(type) )
242 valid_types = new Class[] { GLubyte.class };
243 else if ( PointerWrapper.class.isAssignableFrom(type) )
244 valid_types = new Class[] { GLpointer.class };
245 else if (void.class.equals(type) )
246 valid_types = new Class[] { GLreturn.class };
247 else
248 valid_types = new Class[] { };
249 return valid_types;
250 }
251
252 public Class getInverseType(Class type) {
253 if ( GLuint.class.equals(type) )
254 return GLint.class;
255 else if ( GLint.class.equals(type) )
256 return GLuint.class;
257 else if ( GLushort.class.equals(type) )
258 return GLshort.class;
259 else if ( GLshort.class.equals(type) )
260 return GLushort.class;
261 else if ( GLubyte.class.equals(type) )
262 return GLbyte.class;
263 else if ( GLbyte.class.equals(type) )
264 return GLubyte.class;
265 else if ( GLuint64EXT.class.equals(type) )
266 return GLint64EXT.class;
267 else if ( GLint64EXT.class.equals(type) )
268 return GLuint64EXT.class;
269 else if ( GLuint64.class.equals(type) )
270 return GLint64.class;
271 else if ( GLint64.class.equals(type) )
272 return GLuint64.class;
273 else
274 return null;
275 }
276
277 public String getAutoTypeFromAnnotation(AnnotationMirror annotation) {
278 Class annotation_class = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType());
279 if ( annotation_class.equals(GLint.class) )
280 return "GL11.GL_INT";
281 else if ( annotation_class.equals(GLbyte.class) )
282 return "GL11.GL_BYTE";
283 else if ( annotation_class.equals(GLshort.class) )
284 return "GL11.GL_SHORT";
285 if ( annotation_class.equals(GLuint.class) )
286 return "GL11.GL_UNSIGNED_INT";
287 else if ( annotation_class.equals(GLubyte.class) )
288 return "GL11.GL_UNSIGNED_BYTE";
289 else if ( annotation_class.equals(GLushort.class) )
290 return "GL11.GL_UNSIGNED_SHORT";
291 else if ( annotation_class.equals(GLfloat.class) )
292 return "GL11.GL_FLOAT";
293 else if ( annotation_class.equals(GLdouble.class) )
294 return "GL11.GL_DOUBLE";
295 else
296 return null;
297 }
298 }
+0
-47
src/java/org/lwjgl/util/generator/GLbitfield.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLbitfield.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLbitfield {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLboolean.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLboolean.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLboolean {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLbyte.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLbyte.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLbyte {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLchar.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLchar.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLchar {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLcharARB.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLcharARB.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLcharARB {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLclampd.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLclampd.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLclampd {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLclampf.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLclampf.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLclampf {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLdouble.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLdouble.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLdouble {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLenum.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLenum.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLenum {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLfloat.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLfloat.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLfloat {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLhalf.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLhalf.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLhalf {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLhandleARB.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLhandleARB.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLhandleARB {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLint.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLint.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLint {
46 }
+0
-40
src/java/org/lwjgl/util/generator/GLint64.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 import java.lang.annotation.Target;
34 import java.lang.annotation.ElementType;
35
36 @NativeType
37 @Target({ElementType.PARAMETER, ElementType.METHOD})
38 public @interface GLint64 {
39 }
+0
-40
src/java/org/lwjgl/util/generator/GLint64EXT.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 import java.lang.annotation.Target;
34 import java.lang.annotation.ElementType;
35
36 @NativeType
37 @Target({ElementType.PARAMETER, ElementType.METHOD})
38 public @interface GLint64EXT {
39 }
+0
-47
src/java/org/lwjgl/util/generator/GLintptr.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLintptr.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLintptr {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLintptrARB.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLintptrARB.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLintptrARB {
46 }
+0
-44
src/java/org/lwjgl/util/generator/GLpointer.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 * @author spasi <spasi@users.sourceforge.net>
35 */
36 import java.lang.annotation.Target;
37 import java.lang.annotation.ElementType;
38
39 @Target({ElementType.PARAMETER, ElementType.METHOD})
40 public @interface GLpointer {
41 String value(); // The native pointer type.
42 boolean canBeNull() default false; // Whether the pointer may be null.
43 }
+0
-55
src/java/org/lwjgl/util/generator/GLreturn.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 * When a method is annonated with @GLreturn, the specified output Buffer parameter
35 * will be used to return a single value. The primitive type will match the Buffer type.
36 * String will be returned if the Buffer is a ByteBuffer annotated with @GLchar.
37 *
38 * @author spasi
39 */
40 import java.lang.annotation.ElementType;
41 import java.lang.annotation.Target;
42
43 @NativeType
44 @Target({ ElementType.METHOD })
45 public @interface GLreturn {
46 /** The Buffer parameter to use as the method result. */
47 String value();
48 /** The argument that specifies the maximum number of bytes that may be read (String results only). */
49 String maxLength() default "";
50 /** If true, the maxLength value is going to be used when creating the String. */
51 boolean forceMaxLength() default false;
52 ///** If we use the byte buffer for another parameter, an offset must be used. */
53 //String offset() default "";
54 }
+0
-47
src/java/org/lwjgl/util/generator/GLshort.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLshort.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLshort {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLsizei.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLsizei.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLsizei {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLsizeiptr.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLsizeiptr.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLsizeiptr {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLsizeiptrARB.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLsizeiptrARB.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLsizeiptrARB {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLtime.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 * Unsigned binary representing an absolute absolute or relative time interval.
35 * Precision is nanoseconds but accuracy is implementation-dependent.
36 *
37 * @author spasi <spasi@users.sourceforge.net>
38 */
39
40 import java.lang.annotation.ElementType;
41 import java.lang.annotation.Target;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLtime {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLubyte.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLubyte.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLubyte {
46 }
+0
-47
src/java/org/lwjgl/util/generator/GLuint.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLuint.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLuint {
46 }
+0
-40
src/java/org/lwjgl/util/generator/GLuint64.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 import java.lang.annotation.Target;
34 import java.lang.annotation.ElementType;
35
36 @NativeType
37 @Target({ElementType.PARAMETER, ElementType.METHOD})
38 public @interface GLuint64 {
39 }
+0
-40
src/java/org/lwjgl/util/generator/GLuint64EXT.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 import java.lang.annotation.Target;
34 import java.lang.annotation.ElementType;
35
36 @NativeType
37 @Target({ElementType.PARAMETER, ElementType.METHOD})
38 public @interface GLuint64EXT {
39 }
+0
-47
src/java/org/lwjgl/util/generator/GLushort.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 2983 $
37 * $Id: GLushort.java 2983 2008-04-07 18:36:09Z matzon $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 @NativeType
44 @Target({ElementType.PARAMETER, ElementType.METHOD})
45 public @interface GLushort {
46 }
+0
-50
src/java/org/lwjgl/util/generator/GLvoid.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl.util.generator;
32
33 /**
34 *
35 * @author elias_naur <elias_naur@users.sourceforge.net>
36 * @version $Revision: 3279 $
37 * $Id: GLvoid.java 3279 2010-03-11 21:06:49Z spasi $
38 */
39
40 import java.lang.annotation.Target;
41 import java.lang.annotation.ElementType;
42
43 import com.sun.mirror.type.PrimitiveType;
44
45 @NativeType
46 @Target({ElementType.PARAMETER, ElementType.METHOD})
47 public @interface GLvoid {
48 PrimitiveType.Kind value() default PrimitiveType.Kind.BYTE;
49 }
+0
-205
src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java less more
0 /*
1 * Copyright (c) 2002-2008 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 package org.lwjgl.util.generator;
33
34 import static java.util.Collections.emptyList;
35 import static java.util.Collections.unmodifiableCollection;
36
37 import java.io.File;
38 import java.io.IOException;
39 import java.io.PrintWriter;
40 import java.util.Arrays;
41 import java.util.Collection;
42 import java.util.Set;
43
44 import com.sun.mirror.apt.AnnotationProcessor;
45 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
46 import com.sun.mirror.apt.AnnotationProcessorFactory;
47 import com.sun.mirror.apt.AnnotationProcessors;
48 import com.sun.mirror.apt.Filer;
49 import com.sun.mirror.apt.RoundCompleteEvent;
50 import com.sun.mirror.apt.RoundCompleteListener;
51 import com.sun.mirror.declaration.AnnotationTypeDeclaration;
52 import com.sun.mirror.declaration.InterfaceDeclaration;
53 import com.sun.mirror.declaration.MethodDeclaration;
54 import com.sun.mirror.declaration.ParameterDeclaration;
55 import com.sun.mirror.declaration.TypeDeclaration;
56 import com.sun.mirror.util.DeclarationFilter;
57
58 /**
59 *
60 * Generator tool for creating the References class
61 *
62 * @author elias_naur <elias_naur@users.sourceforge.net>
63 * @version $Revision: 3237 $
64 * $Id: ReferencesGeneratorProcessorFactory.java 3237 2009-09-08 15:07:15Z spasi $
65 */
66 public class ReferencesGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener {
67 private final static String REFERENCES_CLASS_NAME = "References";
68 private final static String REFERENCES_PARAMETER_NAME = "references";
69
70 private static boolean first_round = true;
71
72 // Process any set of annotations
73 private static final Collection<String> supportedAnnotations =
74 unmodifiableCollection(Arrays.asList("*"));
75
76 public Collection<String> supportedAnnotationTypes() {
77 return supportedAnnotations;
78 }
79
80 public Collection<String> supportedOptions() {
81 return emptyList();
82 }
83
84 public void roundComplete(RoundCompleteEvent event) {
85 first_round = false;
86 }
87
88 public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
89 // Only process the initial types, not the generated ones
90 if (first_round) {
91 env.addListener(this);
92 return new GeneratorProcessor(env);
93 } else
94 return AnnotationProcessors.NO_OP;
95 }
96
97 private static class GeneratorProcessor implements AnnotationProcessor {
98 private final AnnotationProcessorEnvironment env;
99
100 GeneratorProcessor(AnnotationProcessorEnvironment env) {
101 this.env = env;
102 }
103
104 public void process() {
105 try {
106