Open matzf opened 4 weeks ago
This pull request introduces multiple new files and modifications primarily focused on enhancing the build and rendering capabilities of a JVM project utilizing OpenGL and OSMesa. Key additions include two GitHub Actions workflows for building and deploying Maven projects, new CMake configurations for shared libraries, and several utility classes for managing OpenGL textures and offscreen rendering. Additionally, various enhancements to error handling, logging, and vector operations are implemented, alongside comprehensive documentation and test files to ensure functionality and maintainability.
File Path | Change Summary |
---|---|
.github/workflows/jvm_build.yml |
New workflow for Maven build on push events. |
.github/workflows/jvm_package_deploy.yml |
New workflow for Maven package deployment on tag pushes. |
.gitignore |
Updated to include new patterns for ignored files related to clangd and build artifacts. |
CMakeLists.txt |
Introduced for configuring the mapscore project, creating a static library with OpenGL support. |
android/src/main/cpp/graphics/OpenGlHelper.h |
Added inline function glCheckError_ for OpenGL error checking and logging. |
android/src/main/cpp/graphics/shader/ColorShaderOpenGl.cpp |
Added error checking after shader operations using glCheckError() . |
djinni/map/loader/loader.djinni |
Added methods for asynchronous texture and data loading with a typo in one method name. |
jvm/CMakeLists.txt |
New CMake configuration for building shared library mapscore_jni . |
jvm/pom.xml |
New Maven POM file for the maps-core project with dependencies and build plugins. |
jvm/readme.md |
Documentation for Java library supporting offscreen rendering using OpenGL. |
jvm/src/main/cpp/jni/GlTextureHelper.cpp |
Introduced OpenGL texture management functions for JNI. |
jvm/src/main/cpp/jni/OSMesa.cpp |
Functions for managing OSMesa context in JNI. |
jvm/src/main/java/io/openmobilemaps/mapscore/MapsCore.java |
Class for initializing native libraries based on OS and architecture. |
jvm/src/main/java/io/openmobilemaps/mapscore/graphics/util/GlTextureHelper.java |
Utility class for OpenGL texture operations. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/loader/FontJsonManifestReader.java |
Class for reading font manifest JSON files. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/loader/HttpDataLoader.java |
Implements HTTP/HTTPS data loading functionality. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/loader/LocalDataLoader.java |
Loads local resources via file and jar URLs. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/util/MapTileRenderer.java |
Class for offscreen tile rendering in the OpenMobileMaps framework. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/util/OffscreenMapRenderer.java |
Class for managing offscreen rendering of maps using OpenGL. |
jvm/src/main/java/io/openmobilemaps/mapscore/map/util/Tiled2dMapVectorLayerBuilder.java |
Builder for Tiled2dMapVectorLayer with customizable options. |
jvm/src/test/java/io/openmobilemaps/mapscore/OffscreenMapRendererTest.java |
Unit tests for the OffscreenMapRenderer class. |
shared/public/Logger.h |
Removed color logging directive, keeping log level unchanged. |
shared/public/Tiled2dMapSourceImpl.h |
Enhanced tile visibility and loading method implementations. |
shared/public/Vec2DHelper.h |
New utility functions for 2D vector operations. |
standalone/CMakeLists.txt |
New CMake configuration for a standalone project. |
standalone/main.cpp |
Implementation for rendering using the OSMesa library. |
standalone/readme.md |
Documentation for the standalone test application. |
🐰 In the meadow where code does bloom,
New workflows sprout, dispelling the gloom.
With textures and shaders, we dance and play,
Offscreen rendering brightens the day!
So hop with joy, let the changes unfold,
A tale of progress, in stories retold! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Add a java library to use the OpenGL-variant of the openmobilemaps in a non-android Java environment. For now, this only explicitly supports offscreen rendering via OSMesa. Currently, this can be built and run only on Linux on amd64. Supporting other platforms should be doable but will require further tweaks (notably using an explicit define to enable the GL entrypoints instead of
ifdef __linux__
).Also add a minimal standalone test application that can be run on Linux without any platform specific bindings (can anyone guess what the demo polygon layer in there represents? :wink:). This has been valuable to me for diagnostics and debugging purposes. This could also be the starting point to a more generic (offscreen) map rendering regression-test tool that can be run e.g. during PRs.
-- Note: github publish workflow might still require some tweaking due the naming of the organization secrets.
Summary by CodeRabbit
New Features
Tiled2dMapSource
class to improve tile visibility and loading processes.Bug Fixes
Documentation
Tests
Chores
.gitignore
to refine ignored file patterns.