summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-10-20 20:16:42 -0400
committerMicha White <botahamec@outlook.com>2022-10-20 20:16:42 -0400
commite337741969160603f06a7f2b30cda375eeef99fb (patch)
tree4835e542cf1b70df18d7c87055175b9367faaf2e
parent94e148af2349ad15df127ee8e720dbbf24bc7587 (diff)
More profiling and error logging
-rw-r--r--Cargo.toml6
-rw-r--r--src/texture.rs4
2 files changed, 7 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index c07a785..01c5738 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,13 +16,15 @@ cgmath = "0.18"
image = "0.24"
texture_packer = "0.24"
profiling = "1"
-tracy-client = "0.14"
+tracy-client = { version = "0.14", optional = true }
+dhat = "0.3"
[lib]
crate-type = ["cdylib", "lib"]
[features]
-profile-with-tracy = ["profiling/profile-with-tracy"]
+dhat = []
+profile-with-tracy = ["tracy-client", "profiling/profile-with-tracy"]
[[example]]
name = "black"
diff --git a/src/texture.rs b/src/texture.rs
index 293a202..e343508 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -261,7 +261,9 @@ impl TextureAtlas {
let atlas_size = extent_3d(self.width, self.height);
// put the packed texture into the base image
- drop(self.fill_image());
+ if let Err(e) = self.fill_image() {
+ log::error!("{}", e);
+ }
// copy that to the gpu
queue.write_texture(