# LEXSDL
---
A SDL2 wrapper <small style=color:#EE0000>(under development)</small> for <span style=color:#0000CC>C</span> and <span style=color:#e33b26>Rust</span>.
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</a>.
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 <span style=color:#e33b26>Rust</span> a safe wrapper is in progress, use of <b>unsafe</b> still necessary.
It can be used in existing projects without beeing disruptive. <small>(in the documentation is more info and full examples)</small>
```
// 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();
```