Expand description
§Kludgine
Kludgine aims to be a lightweight, efficient 2d rendering framework powered by wgpu. Its name Kludgine is named in a way to hopefully be ironic in nature, but it’s being designed and written by a developer that was fairly new to modern graphics programming and Rust. Thus, it is probably a kludge.
Without the app feature enabled, Kludgine provides an API inspired by wgpu’s
Encapsulating Graphics Work article.
With the app feature enabled, Kludgine provides an easy-to-use API for running
multi-window applications.
The API is still a work in progress. The examples folder contains
many examples that highlight a specific feature.
§Project Status
This project is early in development as part of Cushy. It is considered alpha and unsupported at this time, and the primary focus for @ecton is to use this for his own projects. Feature requests and bug fixes will be prioritized based on @ecton’s own needs.
If you would like to contribute, bug fixes are always appreciated. Before working on a new feature, please open an issue proposing the feature and problem it aims to solve. Doing so will help prevent friction in merging pull requests, as it ensures changes fit the vision the maintainers have for Cushy.
Re-exports§
pub use cosmic_text;pub use image;pub use figures;pub use wgpu;
Modules§
- app
- Application and Windowing Support.
- drawing
- An easy-to-use batching renderer.
- shapes
- Types for drawing paths and shapes.
- sprite
- Types for animating textures.
- text
- Types for text rendering.
- tilemap
Macros§
- include_
aseprite_ sprite - Includes an Aseprite sprite sheet and Json
export. For more information, see
Sprite::load_aseprite_json. This macro will append “.png” and “.json” to the path provided and include both files in your binary. - include_
texture - Loads a texture’s bytes into the executable. This macro returns a result
containing a
LazyTexture.
Structs§
- Clip
Guard - A clipped surface.
- Collected
Texture - A texture that is contained within a
TextureCollection. - Color
- A red, green, blue, and alpha color value stored in 32-bits.
- Drawable
- A drawable source with optional translation, rotation, and scaling.
- Frame
- A frame that can be rendered.
- Graphics
- A context used to prepare graphics to render.
- Kludgine
- A 2d graphics instance.
- Kludgine
Id - The unique ID of a
Kludgineinstance. - Lazy
Texture - A
TextureSourcethat loads its data lazily. - Prepared
Graphic - A graphic that is on the GPU and ready to render.
- Rendering
Graphics - A graphics context used to render previously prepared graphics.
- Shared
Texture - A cloneable texture.
- Texture
- An image stored on the GPU.
- Texture
Collection - A collection of multiple textures, managed as a single texture on the GPU. This type is often called an atlas.
- Texture
Region - A region of a
SharedTexture.
Enums§
- AnyTexture
- A type that can be any
TextureSourceimplementation that is provided by Kludgine. - Origin
- The origin of a prepared graphic.
- Shareable
Texture - A texture that can be cloned cheaply.
Traits§
- CanRender
To - A resource that can be checked for surface compatibility.
- Clipped
- A graphics context that has been clipped.
- Drawable
Ext - Translation, rotation, and scaling for drawable types.
- Drawable
Source - A type that can be drawn in Kludgine.
- Kludgine
Graphics - A generic graphics context.
- Shader
Scalable - A unit that is able to be scaled by the GPU shader.
- Shape
Source - A source of triangle data for a shape.
- Texture
Source - A type that is rendered using a texture.