summaryrefslogtreecommitdiff
path: root/alligator_render
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-10-21 20:10:15 -0400
committerMicha White <botahamec@outlook.com>2022-10-21 20:10:15 -0400
commit9950ae8d49d692f698dfafd544748df2bced6d7d (patch)
treeb606e2b341edca67e6073b75b7f3cc999eec5464 /alligator_render
parent11077150cbc909e414cf5b27f18d02629e6b01da (diff)
Changed up some dependencies
Diffstat (limited to 'alligator_render')
-rw-r--r--alligator_render/Cargo.toml5
-rw-r--r--alligator_render/examples/bunnymark.rs7
-rw-r--r--alligator_render/src/lib.rs1
-rw-r--r--alligator_render/src/renderer.rs4
4 files changed, 7 insertions, 10 deletions
diff --git a/alligator_render/Cargo.toml b/alligator_render/Cargo.toml
index e633fb9..cefb924 100644
--- a/alligator_render/Cargo.toml
+++ b/alligator_render/Cargo.toml
@@ -2,6 +2,7 @@
name = "alligator_render"
version = "0.1.0"
edition = "2021"
+rust-version = "1.65"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -17,13 +18,13 @@ image = "0.24"
texture_packer = "0.24"
profiling = "1"
tracy-client = { version = "0.14", optional = true }
-dhat = "0.3"
+dhat = { version = "0.3", optional = true }
[lib]
crate-type = ["cdylib", "lib"]
[features]
-dhat = []
+dhat = ["dep:dhat"]
profile-with-tracy = ["tracy-client", "profiling/profile-with-tracy"]
[[example]]
diff --git a/alligator_render/examples/bunnymark.rs b/alligator_render/examples/bunnymark.rs
index a343ce5..7ef97b7 100644
--- a/alligator_render/examples/bunnymark.rs
+++ b/alligator_render/examples/bunnymark.rs
@@ -1,6 +1,3 @@
-#![feature(once_cell)]
-#![feature(let_else)]
-
use std::{num::NonZeroU32, time::Instant};
use alligator_render::{
@@ -105,6 +102,10 @@ struct Bunny {
}
fn main() {
+ #[cfg(feature = "profile-with-tracy")]
+ profiling::tracy_client::Client::start();
+ profiling::register_thread!("main");
+
// configure the render window
let config = RenderWindowConfig {
title: "BunnyMark",
diff --git a/alligator_render/src/lib.rs b/alligator_render/src/lib.rs
index debb68c..5e0aab6 100644
--- a/alligator_render/src/lib.rs
+++ b/alligator_render/src/lib.rs
@@ -1,4 +1,3 @@
-#![feature(let_else)]
#![feature(nonzero_min_max)]
#![feature(type_alias_impl_trait)]
#![warn(clippy::pedantic)]
diff --git a/alligator_render/src/renderer.rs b/alligator_render/src/renderer.rs
index 9f4aad1..064ff31 100644
--- a/alligator_render/src/renderer.rs
+++ b/alligator_render/src/renderer.rs
@@ -130,10 +130,6 @@ impl Renderer {
// TODO make it possible to use without a window (ie, use a bitmap in memory as a surface)
// TODO this function needs to be smaller
pub fn new(config: &RenderWindowConfig) -> Result<Self, NewRendererError> {
- #[cfg(feature = "profile-with-tracy")]
- profiling::tracy_client::Client::start();
- profiling::register_thread!("main");
-
// build the window
let event_loop = EventLoop::new();
let window = config.to_window().build(&event_loop)?;