use foxy::prelude::*;
use tracing::debug;
pub struct App;
impl Runnable for App {
fn settings() -> FoxyCreateInfo {
FoxyCreateInfo::default()
.with_debug_info(DebugInfo::Shown)
.with_polling(Polling::Poll)
}
fn new(_foxy: &Foxy) -> Self {
Self {}
}
fn update(&mut self, _foxy: &Foxy, event: &FoxyEvent) {
if let FoxyEvent::Input(InputEvent::Keyboard(..)) = event {
debug!("UPDATE: {:?}", event)
}
}
}
fn main() -> FoxyResult<()> {
start_debug_logging_session!();
App::run()
}
The main goal of foxy
is to be a simple, easy-to-use API.
There are 2 primary threads in foxy
:
- main: where the rendering happens and the message pump lives
- foxy: where all the main application code is executed
This layout was chosen to allow for the window messages not to block the application, and to allow rendering not to block on the application code.
This repository contains a few crates as they each naturally evolved and split apart:
- foxy: a simple app framework.
- foxy_window: a simplified, Rust-y API for creating a window using Win32.
- foxy_renderer: a simplified, Rust-y API for drawing to a canvas.
- foxy_utils: a small utilties library.
- Piston: for the idea of how a simple, Rust-y API for an engine might look light.
- Winit: as a reference on events and how to best structure them.
- Vulkan Guide (https://vkguide.dev/): for being a wealth of knowledge on architecturing a vulkan application.
- Brenden Galea: for his amazing Vulkan tutorial series (which I would love for him to continue!).
- One Lone Coder: for inspiration in simplicity and ease of use.
- GetIntoGameDev: for his outstanding Vulkan tutorials in C++.
WGPU: