Crate kludgine

Crate kludgine 

Source
Expand description

§Kludgine

Kludgine is considered alpha and unsupported crate version Documentation for main branch

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§

ClipGuard
A clipped surface.
CollectedTexture
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.
KludgineId
The unique ID of a Kludgine instance.
LazyTexture
A TextureSource that loads its data lazily.
PreparedGraphic
A graphic that is on the GPU and ready to render.
RenderingGraphics
A graphics context used to render previously prepared graphics.
SharedTexture
A cloneable texture.
Texture
An image stored on the GPU.
TextureCollection
A collection of multiple textures, managed as a single texture on the GPU. This type is often called an atlas.
TextureRegion
A region of a SharedTexture.

Enums§

AnyTexture
A type that can be any TextureSource implementation that is provided by Kludgine.
Origin
The origin of a prepared graphic.
ShareableTexture
A texture that can be cloned cheaply.

Traits§

CanRenderTo
A resource that can be checked for surface compatibility.
Clipped
A graphics context that has been clipped.
DrawableExt
Translation, rotation, and scaling for drawable types.
DrawableSource
A type that can be drawn in Kludgine.
KludgineGraphics
A generic graphics context.
ShaderScalable
A unit that is able to be scaled by the GPU shader.
ShapeSource
A source of triangle data for a shape.
TextureSource
A type that is rendered using a texture.