Skip to content

Commit

Permalink
Custom render (#243)
Browse files Browse the repository at this point in the history
* Add render feature

* Fix clippy

* Add the tonemapping_luts feature to dev-dependencies

* Fix broken imports, specify required features for examples

* Expand the CI workflow to cover the render feature

---------

Co-authored-by: BeastLe9enD <[email protected]>
  • Loading branch information
vladbat00 and BeastLe9enD authored Jan 7, 2024
1 parent 26a4264 commit 6f844f0
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 26 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
features:
["", "manage_clipboard", "open_url", "manage_clipboard,open_url"]
features: [
"",
"immutable_ctx",
"manage_clipboard",
"open_url",
"render",
"manage_clipboard,open_url,render",
]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -56,10 +62,12 @@ jobs:
matrix:
features:
[
"",
"immutable_ctx",
"manage_clipboard",
"open_url",
"manage_clipboard,open_url",
"render",
"manage_clipboard,open_url,render",
]
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
Expand Down Expand Up @@ -90,10 +98,12 @@ jobs:
matrix:
features:
[
"",
"immutable_ctx",
"manage_clipboard",
"open_url",
"manage_clipboard,open_url",
"render",
"manage_clipboard,open_url,render",
]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -125,10 +135,12 @@ jobs:
matrix:
features:
[
"",
"immutable_ctx",
"manage_clipboard",
"open_url",
"manage_clipboard,open_url",
"render",
"manage_clipboard,open_url,render",
]
steps:
- uses: actions/checkout@v3
Expand Down
21 changes: 19 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,32 @@ all-features = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["manage_clipboard", "open_url", "default_fonts"]
default = ["manage_clipboard", "open_url", "default_fonts", "render"]
immutable_ctx = []
manage_clipboard = ["arboard", "thread_local"]
open_url = ["webbrowser"]
default_fonts = ["egui/default_fonts"]
render = ["bevy/bevy_render"]
serde = ["egui/serde"]

[[example]]
name = "render_to_image_widget"
required-features = ["render"]
[[example]]
name = "side_panel"
required-features = ["render"]
[[example]]
name = "simple"
required-features = ["render"]
[[example]]
name = "two_windows"
required-features = ["render"]
[[example]]
name = "ui"
required-features = ["render"]

[dependencies]
bevy = { version = "0.12", default-features = false, features = [
"bevy_render",
"bevy_asset",
] }
egui = { version = "0.24.0", default-features = false, features = ["bytemuck"] }
Expand All @@ -41,4 +57,5 @@ bevy = { version = "0.12", default-features = false, features = [
"png",
"bevy_pbr",
"bevy_core_pipeline",
"tonemapping_luts",
] }
Loading

0 comments on commit 6f844f0

Please sign in to comment.