mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
perf counter for render
This commit is contained in:
parent
c9677c87d8
commit
1b7f0e0b93
17 changed files with 331 additions and 358 deletions
|
|
@ -20,3 +20,13 @@ pub trait HasSampler {
|
|||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_export] macro_rules! has_sampler {
|
||||
(|$self:ident:$Struct:ty| { sampler = $e0:expr; index = $e1:expr; }) => {
|
||||
impl HasSampler for $Struct {
|
||||
fn sampler (&$self) -> &Option<Sampler> { &$e0 }
|
||||
fn sampler_mut (&mut $self) -> &mut Option<Sampler> { &mut $e0 }
|
||||
fn sample_index (&$self) -> usize { $e1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue