wxpg is an experimental, custom-tailored 2D/3D game engine built in Rust. It serves as a foundational layer, providing abstractions over low-level graphics, UI, and entity-component-system (ECS) libraries.
This project is a continuation of vox, shifting from a pure-voxel focus to a more general-purpose rendering engine architecture.
This engine is in the early stages of development. The APIs are not stable and are subject to change. It provides a set of abstractions over its core dependencies and is not a "batteries-included" engine. The main src/main.rs file serves as the primary example of its current capabilities.
- Rendering: A
wgpu-based render pipeline (DefaultPipeline) with aRenderStoragesystem for managing meshes, models, materials, and instances. - ECS: Uses
bevy_ecsfor its core architecture. - Screen Management: A
ScreenServerstate machine to manage game states (e.g.,GameState::Menu,GameState::Game). - Asset Loading: An
AssetServerfor loading and managing assets like textures (.png,.jpg) and 3D models (.obj). - UI: Integrated
eguisupport via a dedicatedEguiRenderermodule. - Text: Integrated
glyphonsupport for high-performance text rendering. - Input: A simple
InputServerfor handling key states (Pressed, Released, JustPressed) and mouse delta.
wxpg is built on top of several powerful Rust libraries:
- Graphics: wgpu
- ECS: bevy_ecs
- UI: egui (with
egui_plotfor graphing) - Text: glyphon
- Windowing: winit
- Math: cgmath
- Model Loading: tobj
The project is configured as a library with a runnable example in src/main.rs.
- Clone the repository.
- The engine's
AssetServerexpects resource files (likedebug.png) to be in ares/directory at the root of the project. - Run the main example:
cargo run