lexsdl 0.2.0

A wrapper for SDL2 to abstract away annoying parts
docs.rs failed to build lexsdl-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: lexsdl-0.1.0

LEXSDL


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

Once SDL3 is stable it will be used.

The documentation can be found here.

It can be used in existing projects without beeing disruptive.

On Rust a safe wrapper has not been made, use of unsafe is necessary.

// 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();

NOTE: is nesceceary to have SDL2 installed and in the path of the C compiler.