Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom drawable layer v3 #3210

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

adrian-cojocaru
Copy link
Collaborator

@adrian-cojocaru adrian-cojocaru commented Feb 11, 2025

Update for CustomDrawableLayer interface and existing example.

  • added removeDrawable for existing drawables (currently the only way to update vertex geometry is to remove and re-add the drawable)
  • added tweaker callbacks that can update drawable properties/options
  • added setGeometryOptions/addGeometry for uploading externally generated geometry (example generateGeometry and loadGeometry using tinyobjloader)
  • updated CustomDrawableLayer tweakers to work with consolidated UBOs
  • added an example to the glfw sample (tested with all rendering backends)
  • fixed Remove macros Vulkan shader definitions #3203

@adrian-cojocaru adrian-cojocaru self-assigned this Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%  +352Ki  +0.2% +78.1Ki    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3210-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +32% +36.5Mi  +439% +26.3Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3210-compared-to-legacy.txt

Copy link

github-actions bot commented Feb 11, 2025

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            -0.0078         -0.0083             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-3210-compared-to-main.txt

@sjg-wdw
Copy link
Collaborator

sjg-wdw commented Feb 11, 2025

I like the changes to the Custom Drawable interface and the example. How did you end up feeling about the OBJ reader?

@adrian-cojocaru
Copy link
Collaborator Author

In the example the OBJ reader ended up being used with a sphere and it's mostly just a proof of concept. It can be extended later to use vertex color and normals from the file.

Copy link

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +31.9Ki  +0.1% +16.0Ki    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-3210-compared-to-main.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Remove macros Vulkan shader definitions
3 participants