summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/src/render.rs25
1 files changed, 3 insertions, 22 deletions
diff --git a/graphics/src/render.rs b/graphics/src/render.rs
index 18dc5e3..8a8aeff 100644
--- a/graphics/src/render.rs
+++ b/graphics/src/render.rs
@@ -153,19 +153,13 @@ pub struct Renderer {
tiles_hash: Option<u64>,
/// Framebuffer to render the whole (unscaled) game to
framebuffer: Option<RenderTexture2D>,
+ /// Show debug UI
+ debug: bool,
/* Per Frame Caculated Data */
- /// Current tile size we are rendering
- //tile_size: u16,
/// Last known FPS
fps: u32,
- /// Render width of the current frame
- //width: u16,
- /// Render height of the current frame
- //height: u16,
/// The current frame
frame: u64,
- /// Show debug UI
- debug: bool,
}
impl Renderer {
pub fn new(handle: &mut RaylibHandle, thread: &RaylibThread) -> crate::Result<Self> {
@@ -193,12 +187,9 @@ impl Renderer {
tilemap_mm,
tiles_hash: None,
framebuffer: Some(framebuffer),
- //tile_size: 0,
+ debug: false,
fps: 0,
- //width: 0,
- //height: 0,
frame: 0,
- debug: false,
})
}
@@ -267,16 +258,6 @@ impl Renderer {
fn update_per_frame_data(&mut self, handle: &RaylibHandle) {
// Get last known fps
self.fps = handle.get_fps();
- //// Get size of framebuffer
- //self.width = downcast!(handle.get_render_width(), u16).max(MIN_RENDER_SIZE);
- //self.height = downcast!(handle.get_render_height(), u16).max(MIN_RENDER_SIZE);
- //// Get size (in pixels) to draw each tile
- //self.tile_size = {
- // let size = self.width.min(self.height);
- // let dist = VIEW_DISTANCE * 2 + 1;
- // let pixels = size.div(dist).max(TEXTURE_SIZE);
- // 1 << (u16::BITS - pixels.leading_zeros())
- //};
// Update frame counter
self.frame += 1;
}