Commit Graph

114 Commits

Author SHA1 Message Date
Michael Pfaff 8dbd70ee34
Try to optimize the builds a little bit more. There is a pretty rare race condition that causes a build failure (bad synchronization in the java compiler). 2022-09-12 21:08:44 -04:00
Michael Pfaff 314078eb11
Fix generators (needed to flush PrintWriters, even though it's backed by an in-memory buffer) 2022-09-09 00:42:36 -04:00
Michael Pfaff 00d87d7003
Fix logging when a file is skipped 2022-09-08 22:22:16 -04:00
Michael Pfaff 7148fe1ec7
Fix validation timing 2022-09-08 13:40:36 -04:00
Michael Pfaff 0001c5897e
Change generator logging a bit and add novalidate flag 2022-09-08 13:37:32 -04:00
Michael Pfaff 74841b5262
Change SupportedSourceVersion annotation to 10 2022-09-08 13:18:53 -04:00
Michael Pfaff bc6c628f6e
Remove SupportedSourceVersion annotation 2022-09-08 13:14:22 -04:00
Michael Pfaff b418015c02
Increase parallelization 2022-09-08 12:22:31 -04:00
Michael Pfaff 0ebbec4e7f
Optimize generators 2022-09-08 07:10:40 -04:00
Michael Pfaff b53c59b989
Clean-up 2022-08-16 14:27:14 -04:00
Michael Pfaff 68d112adec
Fixed generated C files output path
In addition to the main fix...

- refactored GeneratorVisitor a bit
- slightly improve context in a debug message
2022-08-10 21:01:25 -04:00
Michael Pfaff 134263f5cd
More progress, Windows build is definitely broken for now 2022-08-09 21:59:46 -04:00
Michael Pfaff 68e2ca0b76
Part 1/2
- Remove applet
- Remove webstart
- Refactor all generation to the `target` folder
- Remove eclipse-update
- Update java version in `.tool-versions`
- Update `.gitignore`
- Remove unused `res` folder
- Only macOS builds work currently
- TODO: finish the aforementioned changes to all other targets
- `build.sh` runs in headless mode to avoid the focus stealing and
  performance issues on macOS
2022-03-22 21:26:50 -04:00
Michael Pfaff 229a1da41b
Added build script and update minimum versions to Java 1.8 2022-01-05 13:50:35 -05:00
Ioannis Tsakpinis e08c0fbf56 Finished work on the annotation processing port from apt to javac.
LWJGL now requires JDK 6 or later to build, but will continue to work on Java 5. In this commit: removed native file "last modified time" handling.
2014-09-15 01:45:48 +03:00
Ioannis Tsakpinis e4fc386372 Fixed field/method order so that javac output matches apt output. 2014-09-15 01:31:22 +03:00
Ioannis Tsakpinis d17c19fe01 Restored check that skips generation if the source template has not changed.
Note that javac still always recompiles everything. This makes the build process slower than before (apt was using the already compiled templates as input). Will investigate some other time if this can be mitigated.
2014-09-14 22:04:51 +03:00
Ioannis Tsakpinis 78911cc0d4 Made the javac-based Generator compatible with JDK 6. 2014-09-14 21:59:47 +03:00
Ioannis Tsakpinis 59323ff03f Automatic code reformatting.
Nothing to see here, just a cleanup so that subsequent commits are cleaner.
2014-09-14 17:16:51 +03:00
Ioannis Tsakpinis 774bd17ece Ported annotation processing from apt to javac.
This is a manual merge of request #86 by @b23prodtm. The original patch is fantastic, but as expected has a few issues that will be fixed in subsequent commits.
2014-09-14 17:07:56 +03:00
Ioannis Tsakpinis 1ea14545f6 Simplified pattern matching when stripping types and the 'v' postfix, which fixed a few corner cases. 2014-08-16 15:39:04 +03:00
Ioannis Tsakpinis cb759158e7 Fixed some native compilation warnings. 2014-08-04 22:25:12 +03:00
Ioannis Tsakpinis c17617175b Workaround to preserve case when checking availability of APPLE OpenCL extensions. 2014-04-02 13:36:25 +03:00
Ioannis Tsakpinis f97ac09641 Removed NondirectBufferWrapper. It was only used in the Cursor constructor and in a way that could cause crashes: Passing heap buffers to both the images and delays arguments would result in both sharing the same direct memory. 2013-10-30 17:20:28 +02:00
Ioannis Tsakpinis 1df5d25560 Added support for PointerBuffer parameters to OpenGL. 2013-07-23 01:57:41 +03:00
Ioannis Tsakpinis 3caf672e42 Fixed pointer array init for NIO buffers. 2013-07-22 20:13:01 +03:00
Ioannis Tsakpinis 5400bb27db Misc fixes and improvements on Windows:
- Cleaned up cl flags and enabled parallel compilation. Native compilation
  is now multiple times faster.
- Fixed all /W3 compilation warnings.
- Changed window flag from WS_CHILDWINDOW to WS_POPUP when Display.setParent
  is used, in an attempt to fix focus-related issues.
2013-01-29 22:53:11 +02:00
Ioannis Tsakpinis 517d6cfb3b Properly escape '_' in native method stubs. 2013-01-01 18:12:53 +02:00
Ioannis Tsakpinis 778765c6de Now generates @Deprecated annotation for deprecated methods. 2012-12-12 19:18:35 +02:00
Ioannis Tsakpinis 1c4dfae74c Fixed duplicate fields in GL References. 2012-11-25 12:01:24 +02:00
Ioannis Tsakpinis ad4f4c74eb Restored (most of) the removed methods from the previous commit and added deprecation warnings. 2012-08-19 06:56:25 +00:00
Ioannis Tsakpinis 929817a4eb Added support for OpenGL 4.3 and OpenGL ES 3.0.
Modified the generator process to use relative paths. We were hitting the command line length limit on Windows.
Some extension improvements, fixes and spec updates.
2012-08-07 15:14:03 +00:00
Ioannis Tsakpinis ad7769f9c9 Added support for OpenCL 1.2 [UNTESTED] 2011-11-16 14:36:28 +00:00
Ioannis Tsakpinis 0d0ffcbb59 Fixed signatures: CharSequence[] parameters and ByteBuffer returns. 2011-10-13 16:53:53 +00:00
Ioannis Tsakpinis dd87468d6f Added @Optional support for AL and GLES. 2011-10-12 17:58:04 +00:00
Ioannis Tsakpinis b333b029bd Fixed GLX extension detection. 2011-08-18 17:13:05 +00:00
Ioannis Tsakpinis 67945fe317 Added unicode support on Windows.
Fixed AL and GLES native stub bindings.
Replaced many GetStringNativeChars usages with a Java implementation.
2011-08-16 22:17:32 +00:00
Ioannis Tsakpinis 83c2208aa0 Added support for NV_path_rendering.
Made MappedObjectUnsafe package private.
2011-07-29 11:30:14 +00:00
Ioannis Tsakpinis a9a7067461 Converted GL APIUtil to a per ContextCapabilities instance. 2011-07-16 22:26:46 +00:00
Ioannis Tsakpinis 4a02aed129 More java-side pointer arithmetic.
Fixed pointer cast warning.
2011-07-16 16:42:51 +00:00
Ioannis Tsakpinis 0b0e185f47 Moved all pointer arithmetic to Java code. 2011-07-16 16:05:37 +00:00
Ioannis Tsakpinis 40cbf3e45f Added support for OpenGL ES. 2011-05-17 16:53:57 +00:00
Ioannis Tsakpinis 1b6a2e866c Reverted @CachedReference tracking removal. 2010-11-29 18:25:28 +00:00
Ioannis Tsakpinis 485f5adca2 Fixed @Reuse + @BufferObject generation. 2010-11-05 17:13:56 +00:00
Ioannis Tsakpinis 007ef98dec Fixed Strings, seriously now. 2010-10-12 21:13:03 +00:00
Ioannis Tsakpinis d560813754 Another String signature fix. 2010-10-12 20:49:29 +00:00
Ioannis Tsakpinis efb5586b2b Fixed String signatures. 2010-10-12 20:25:33 +00:00
Ioannis Tsakpinis 60bd1c00ac Minor clean-up. 2010-10-04 17:04:46 +00:00
Ioannis Tsakpinis 2b79b68501 Misc GL/CL fixes and additions.
Made native calls package private, we can now use them from the high-level API.
Added support for "render-to-texture" in the fractal demo.
2010-09-30 17:21:50 +00:00
Ioannis Tsakpinis a8bcb7fd25 Ported codebase to Java 1.5.
Misc OpenCL fixes and API improvements.
Changed fractal demo to use events/sync objects instead of cl/glFinish for synchronization. (untested)
2010-09-28 21:11:35 +00:00
Ioannis Tsakpinis 1aa9ab5104 Added support for OpenCL & CL/GL interop + minor improvements. [WIP] 2010-09-26 23:43:24 +00:00
Ioannis Tsakpinis 6be13dfd45 2010-08-16 22:18:33 +00:00
Ioannis Tsakpinis 3e698786be Fixed NPE when safeNewBuffer returns NULL. 2010-08-16 22:09:01 +00:00
Ioannis Tsakpinis 5842103580 Added support for OpenGL 4.1 and new extensions. 2010-07-27 15:33:22 +00:00
Ioannis Tsakpinis 21b3c3d818 Added PixelFormat support for framebuffer CSAA (NV_multisample_coverage, WGL & GLX only).
Added support for AMD_name_gen_delete and AMD_debug_output. The AMDDebugOutputCallback class enables query-less message handling.
Added support for extension aliases.
2010-05-27 22:56:29 +00:00
Brian Matzon ba88605f00 EFX patch by Ciardhubh 2010-05-24 21:50:26 +00:00
Ioannis Tsakpinis e61f005051 Fix for OpenAL debug builds.
Added alternate methods for NV_fence.
2010-05-07 17:03:36 +00:00
Ioannis Tsakpinis 47c9991b41 Fixed ByteOrder of @Return ByteBuffers.
Cleaned up Drawable interface and introduced a reusable base implementation.
Added support for disabling runtime function checks, buffer checks and state tracking. Activated with -Dorg.lwjgl.util.NoChecks=true
2010-04-22 23:21:48 +00:00
Ioannis Tsakpinis 4eb94622ca Added @NoErrorCheck on vertex data methods.
The debug build will now track Begin/End pairs and never call GetError inside them.
2010-04-09 23:57:40 +00:00
Ioannis Tsakpinis 6e738cc2b6 Added support for NVX_gpu_memory_info (experimental extension).
Added support for initializing extensions that are not exposed in GL_EXTENSIONS (enables EXT_direct_state_access and NV_primitive_restart on AMD GPUs, use at your own risk).
Updated @Optional functions for AMD GPUs (driver version: 10.3)
2010-03-31 15:46:16 +00:00
Ioannis Tsakpinis ef86a6c501 Added alternatives for glGetActiveUniform/Attrib.
Added a javadoc comment to all alternative methods.
2010-03-23 12:43:44 +00:00
Ioannis Tsakpinis b17aa7d21b Added JNIEXPORT to AL alternate methods.
Now forcing full regen when any class in the Generator changes.
2010-03-16 19:05:19 +00:00
Ioannis Tsakpinis 3715e4b39d Added some alternate AL functions. 2010-03-16 17:58:48 +00:00
Ioannis Tsakpinis 94a4c50a83 Added support for single primitive input/output parameters. 2010-03-14 23:24:40 +00:00
Ioannis Tsakpinis e97e601894 Added Charset encoding to StringUtils
Changed shader tests to use the String APIs
Finished ARB_uniform_buffer_object shader test
Fixed native code compiler warnings
Made the generator check file timestamps to avoid unnecessary 3+ min builds
2010-03-14 00:19:48 +00:00
Ioannis Tsakpinis fd5bd2589d Force Indirect for StringLists 2010-03-12 23:35:55 +00:00
Ioannis Tsakpinis 6879b33e52 Cleaned imports. 2010-03-12 22:20:25 +00:00
Ioannis Tsakpinis 3e87a3ae7b Address var fix. 2010-03-12 22:14:11 +00:00
Ioannis Tsakpinis 6ac8e327f2 Added support for Strings! (WIP, needs more testing) 2010-03-12 21:55:13 +00:00
Ioannis Tsakpinis c3d6d43d2a Added support for OpenGL 3.3 and OpenGL 4.0. 2010-03-11 21:06:49 +00:00
Ioannis Tsakpinis 0a6dbd78ac Removed glPrimitiveRestart from GL31 (immediate mode call that never made it to the core)
Added Optional annotation for functions that miss from incomplete implementations.
2010-02-07 15:15:33 +00:00
Ioannis Tsakpinis ede27aaa21 Improved compatibility mode detection
Removed support for indirect buffers as arguments to GL functions
Added missing tokens in GL30 & GL32
Added support for AMD_seamless_cubemap_per_texture & AMD_shader_stencil_export
Fixed AMD_vertex_shader_tessellator typo
Added AMD extensions to the build process >.<
2010-01-31 16:40:51 +00:00
Ioannis Tsakpinis d97fc05a7b Added support for explicit length arguments in functions that map buffer objects.
Simplified CachedResult handling of functions that map buffer object ranges.
Improved documentation of CachedResult functions.
2010-01-04 18:47:49 +00:00
Ioannis Tsakpinis 6e5355bc83 Added generator support for null-terminated string lists.
Fixed GetUniformIndices and TransformFeedbackVaryings.
Added a ARB_uniform_buffer_object test.
2009-12-04 04:49:19 +00:00
Ioannis Tsakpinis d8c16cc20c Updated EXT_direct_state_access to latest revision.
Improved postfix stripping and extension dependency.
2009-12-01 03:37:27 +00:00
Ioannis Tsakpinis 9a5f795a84 Added support for PIXEL_STORE state tracking.
Changed PBO GLChecks to use LWJGL's state tracking instead of using glGetInteger.
2009-09-08 15:07:15 +00:00
Ioannis Tsakpinis f4eb23f860 Fixed Context init when using the debug library.
Removed glGetError call before buffer swapping.
2009-09-08 12:27:59 +00:00
Ioannis Tsakpinis 90001d5aa6 GLsync annotation not needed anymore. 2009-08-12 13:13:17 +00:00
Ioannis Tsakpinis 6befeb63f2 Completed GL32 support.
Added Generator support for wrapping GL pointers.
Added support for passing command-line arguments to tests.
Added test for ARB_sync functionality.
Temp fix to NV_shader_buffer_load.
2009-08-12 13:06:11 +00:00
Ioannis Tsakpinis 969930902c Added missing annotations. 2009-08-05 07:09:36 +00:00
Ioannis Tsakpinis b130c415f7 Added support for OpenGL 3.2 and the following extensions: AMD_draw_buffers_blend, ARB_depth_clamp, ARB_draw_buffers_blend, ARB_draw_elements_base_vertex, ARB_fragment_coord_conventions, ARB_provoking_vertex, ARB_sample_shading, ARB_seamless_cube_map, ARB_shader_texture_lod, ARB_texture_cube_map_array, ARB_texture_gather, ARB_texture_multisample, ARB_texture_query_lod, ARB_vertex_array_bgra, EXT_separate_shader_objects, EXT_texture_snorm, NV_copy_image, NV_parameter_buffer_object2. 2009-08-04 18:21:41 +00:00
Ioannis Tsakpinis 1e4499f527 Force forward compatible mode when we have GL3.1+ but miss ARB_compatibility.
Added support for ARB_framebuffer_object.
Added support for GLX_ARB_create_context. (WIP)
Improved postfix stripping in the generator.
2009-03-26 11:08:43 +00:00
Ioannis Tsakpinis 6ea785334e ContextAttribs: changed factory to constructor initialization
Fixed compatible spelling
Small pbuffer fix
2008-08-19 17:47:24 +00:00
Ioannis Tsakpinis d7ee23f9b2 Added support for OpenGL 3.0 functionality
Added support for OpenGL 3.0 context creation (MAJOR/MINOR versions, DEBUG mode, FORWARD_COMBATIBLE mode)
Added support for OpenGL 3.0 context sharing
Added support for OpenGL 3.0 extension detection
Improved support for floating point PixelFormats (ARB_color_buffer_float)
Added support for packed floating point PixelFormats (EXT_packed_float)
Added support for sRGB PixelFormats (ARB_framebuffer_sRGB)
Added support for pseudo-FORWARD_COMBATIBLE mode (deprecated functions not loaded)
Added support for EXT_direct_state_access
2008-08-19 16:46:03 +00:00
Brian Matzon bb16ec7492 updated and added license where needed 2008-04-07 18:36:09 +00:00
Brian Matzon 21b2cc0c21 cleaning imports 2007-10-20 21:31:52 +00:00
Elias Naur 98c79d991d Missing change to ContextCapabilitiesGenerator from last commit 2007-06-06 12:18:33 +00:00
Elias Naur ddfae1512d Don't use GL13 and ARB_vertex_shader constants in BaseReferences if they're not supported 2007-06-06 12:07:45 +00:00
Elias Naur 59a3176ace Implemented proper buffer reference retaining for complicated functions like glVertexAttribPointer and glTexCoordPointer. Patch by MatthiasM. 2007-05-22 22:30:21 +00:00
Elias Naur c025a7c70f Re-implemented VBO buffer binding caches to speed up gl*Pointer calls. Patch by MatthiasM. 2007-04-29 20:22:25 +00:00
Elias Naur b386d2185b Added support for non-direct in glGet* style functions 2007-04-23 20:17:42 +00:00
Elias Naur d9373a798a Move null parameter checks from check classes to the generated classes, since calculateImageSize assumes the buffer being non-null 2007-04-15 19:43:35 +00:00
Elias Naur 7c6511cf66 Added support for non-direct buffers for all functions that doesn't cache the buffer address at the native side (e.g. glVertexPointer). Reasons:
1. We can now support calls like "glLight(..., ..., FloatBuffer.wrap(new float[] {...}));" without worrying about running out of direct memory heap, 
since both the FloatBuffer and the array are allocated on the java heap. Future JVMs with stack allocation support could improve this even further.
2. We avoid getting in the way of users that doesn't (yet) know why direct buffers are important.

Obviously, we'd like direct support for arrays, but non-direct buffers are a nice compromise that avoids the API bloat that results when almost all 
functions gain an overloaded versions that take arrays instead of buffers.

Notes:

1. Non-direct buffer support should not affect the performance in the direct buffer case, since the non-direct buffer code path is only activated 
when the isDirect() check fails, and we were already checking isDirect() for sanity checking.
2. When using non-direct buffers, the buffer contents (remaining() bytes) are copied to a resizable ThreadLocal cached direct buffer (which is 
resized as needed) and used instead of the non-direct buffer. Thus, performance of non-direct buffers is lower than direct buffers.
2007-04-11 17:30:13 +00:00
Elias Naur 5a2c33423a Moved null check from generated code to BufferChecks and removed unused buffer checks 2007-04-11 16:13:05 +00:00
Elias Naur eaed716958 Generator: Support arbitrary @AutoResultSize expressions. Make Buffer result sizes long instead of int 2006-12-20 19:19:56 +00:00
Elias Naur 93eabcf999 Generator: Make sure that @GLvoid types result in proper address calculations at the native side, even though the parameter java type is not java.nio.Buffer 2006-11-27 23:01:01 +00:00
Elias Naur 2502496b2d Made all GL functions only query ContextCapabilities.getCapabilities() once. Now all GLCheck checks will take the ContextCapabilities instance as an argument instead of querying for it. Inspired by MatthiasM, who just don't seem to be content with LWJGL performance, ever ;) 2006-11-19 13:33:45 +00:00
Elias Naur 7b7ad52f29 ReferencesStack now clears references when popping to avoid keeping buffer references around too long 2006-07-31 22:37:31 +00:00
Elias Naur c64dd328f9 Added a native NewStringNativeUnsigned to avoid compile warnings 2006-07-07 10:36:26 +00:00
Ioannis Tsakpinis bb66074c13 Fixed i64 suffixes 2006-05-26 12:58:37 +00:00