Crate frug

Source
Expand description

FRUG is intended to provide a similar abstraction layer over graphics programming as to how SDL does for C++, meaning that it should provide developers enough control and flexibility to implement their own architectures & design patterns, yet simplifying the process of working with graphics so developers won’t have to worry about implementing all the repetitive tasks related to getting things to the screen.

Please see the documentation for more information.

I’M MIGRATING THIS WHOLE THING FROM WGPU TO SDL3. PLEASE HOLD ON!!!

Re-exports§

pub use sdl3;

Modules§

render
2D accelerated rendering
ttf
A binding for the library SDL2_ttf
video

Structs§

Color
EventPollIterator
An iterator that calls EventPump::poll_event().
Instance
Frug Instance. Holds the context and the canvas
Rect
A (non-empty) rectangle.
Sprite
This struct will assume that there is a row per “animation”. frames_in_rows will contain the number of frames per each row.
TextureQuery
Vec2d

Enums§

Event
Different event types.
Keycode
ScaleMode

Traits§

LoadTexture
Method extensions for creating Textures from a TextureCreator

Functions§

create_text_texture
Creates a texture from a given font and a given text. font - The font to use. text - The text to render. color - The color of the text. texture_creator - The texture creator to use.