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

Egui image api #72

Merged
merged 24 commits into from
Dec 3, 2023
Merged

Egui image api #72

merged 24 commits into from
Dec 3, 2023

Conversation

melody-rs
Copy link
Member

Description
egui 0.23.0 got a new image API, and deprecated egui_extras::RetainedImage. This pull request adds a custom egui image loader to load from the project filesystem.

This allows us to use ui.image("project://{})" to display images from the currently open project in a way that aligns with egui's design.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo build --release
  • If applicable, run trunk build --release

@melody-rs melody-rs requested a review from a team as a code owner December 3, 2023 00:11
melody-rs and others added 2 commits December 2, 2023 16:20
* feat: add Source Han Sans (for displaying CJK characters)

* perf: compress fonts to reduce binary size
@melody-rs melody-rs added this to the v1.0 milestone Dec 3, 2023
Copy link
Collaborator

@white-axe white-axe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get this wgpu error when enabling the collision shader on native (web is fine):

wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `encoder`
    In a draw command, indexed:false indirect:false
      note: render pipeline = `Tilemap Collision Render Pipeline`
    The pipeline layout, associated with the current render pipeline, contains a bind group layout at index 0 which is incompatible with the bind group layout associated with the bind group at 0

I don't know how I missed this, but the collision shader still expected there to be a bind group when we weren't passing one!
@melody-rs
Copy link
Member Author

Should be fixed now!

@melody-rs melody-rs merged commit 17c6c87 into Astrabit-ST:dev Dec 3, 2023
5 checks passed
@melody-rs melody-rs deleted the egui-image-api branch December 3, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants