Files
Verbatim/src/render/mod.rs
T
Emil 019ae8f090 feat: three render modes — terminal, ascii, graphics
Three render modes:
- --mode terminal: pure ANSI ASCII in terminal
- --mode ascii: Vulkan window with ASCII characters (glyph atlas)
- --mode graphics: Vulkan window with colored cells (no glyphs, each
  material = unique base color, no lighting yet)

Graphics renderer:
- Same Vulkan pipeline as ASCII but without glyph atlas
- Simpler shaders: graphics.vert/frag just output instance color
- No descriptor set, no texture sampling
- Each cell = colored quad, material color fills entire cell
- Entities rendered as colored shapes (player=yellow, goblin=green)

Default mode changed to --mode ascii
109 tests, 0 failures
2026-06-21 00:59:19 +03:00

16 lines
443 B
Rust

pub mod terminal;
pub mod window_input;
pub mod vulkan;
pub mod graphics;
use crate::entity::EntityManager;
use crate::world::grid::Grid;
pub trait Renderer {
fn init(&mut self) -> std::io::Result<()>;
fn render(&mut self, grid: &Grid, entities: &EntityManager, cam_x: i32, cam_y: i32) -> std::io::Result<()>;
fn shutdown(&mut self) -> std::io::Result<()>;
fn viewport_w(&self) -> usize;
fn viewport_h(&self) -> usize;
}