lexsdl

Crates.iolexsdl
lib.rslexsdl
version0.3.0
sourcesrc
created_at2023-01-27 19:18:25.67843
updated_at2023-02-06 21:14:00.102148
descriptionA wrapper for SDL2 to abstract away annoying parts
homepage
repositoryhttps://gitlab.com/Alexevier/lexsdl
max_upload_size
id769855
size194,552
alexevier (alexevier)

documentation

README

LEXSDL


A SDL2 wrapper (under development) for C and Rust.

Once SDL3 is stable it will be used.

The documentation can be found as a download in the releases page <a href=https://gitlab.com/Alexevier/lexsdl/-/releases>here.

Some functions are implemented in rust but there is no need for a rust compiler as in the releases page are compiled libs available for Linux 32/64 bits and Windows 32/64 bits.

The .a might be big but it doesn't affect the final binary size.

For linux a install script is available.

It is still necessary to have SDL installed and a C compiler even on Rust.

On Rust a safe wrapper is in progress, use of unsafe still necessary.

It can be used in existing projects without beeing disruptive. (in the documentation is more info and full examples)

// the easiest is to set the window and the renderer

SDL_Window *yourSdlWindow = SDL_CreateWindow(..);
SDL_Renderer *yourSdlRenderer = SDL_CreateRenderer(..);

LEXSDL_SetWindow(yourSdlWindow);
LEXSDL_SetRenderer(youtSdlRenderer);

// now it can be used with the rest of the lib
LEXSDL_NewFrame();
/* draw textures and stuff */
LEXSDL_ShowFrame();
Commit count: 0

cargo fmt