wip: fill out the snippets
This commit is contained in:
1 parent
4a72b3140b
commit
6051b0ec86
14 files changed
+185
-66
No files matched your search
@@ -77,13 +77,14 @@ impl ActiveFrame {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next(&mut self) -> &mut BumpFrame {
|
||||
*self.generation.borrow_mut() += 1;
|
||||
|
||||
if *self.generation.borrow() % 2 == 0 {
|
||||
&mut self.frames[0]
|
||||
} else {
|
||||
&mut self.frames[1]
|
||||
pub fn old_frame_mut(&mut self) -> &mut BumpFrame {
|
||||
match *self.generation.borrow() & 1 == 0 {
|
||||
true => &mut self.frames[1],
|
||||
false => &mut self.frames[0],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn cycle_frame(&mut self) {
|
||||
*self.generation.borrow_mut() += 1;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user