
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Is a SDL2 for c# The wrapper provides bindings for the following libraries: - SDL2 (2.30.7) - SDL2_image (2.8.2) - SDL2_mixer (2.8.0) - SDL2_ttf (2.22.0) - Utils (functions that facilitate the development) And contains the necessary DLLs for the project in SDL-Sharp-DLL
Is a SDL2 for c#. The wrapper provides bindings for the following libraries (contains the necessary DLLs for the project in SDL-Sharp-DLL):
To use opengl and openal in SDL we recommend using Silk.NET and OpenTK
Note1: All extensions have all functions (or should have) updated, and nuget has updated DLLs.
However the SDL has been down in time since update (2.0.7), and has many new functions between (2.0.8) and (2.24.1).
I'm working to go adding these functions until the latest update, in case it's (2.24.1).
Note2: News are coming in this project, it has been updated again!!!!!
First install SDL-Sharp nuget in your .NET project
Before using any SDL function, consider calling SdlLoader.LoadDefault();
, this function will load the necessary DLLs for the project. Otherwise, you will have to load the DLLs manually.
Just install the sdl using a package manager of your system that SDL-Sharp will already use the sdl binaries
Just install SDL-Sharp-DLL nuget in yot .NET project
The SDL-Sharp project was made based on other projects:
With some modifications in both
This project aims to make SDL2 non-aggressive in c#
In SDL-Sharp Window, Renderer, Texture, Font and Music are pointers same as IntPtr. So the SDL.CreateWindow() function returns a Window and not a Window* (exemple)
However Surface, Chunk and others are not pointers, so the functions return a Surface* or PSurface (example), in these cases there are P(Structure name) such as PChunk, PSurface... (P of pointer)
To be able to use pointers in C#, you have to enable Unsafe Code and use these pointers (void*) inside an unsafe { //Pointers here// }
SDL2# code would look like this:
SDL.SDL_Init(SDL.SDL_INIT_VIDEO);
IntPtr window = SDL.SDL_CreateWindow("Window", SDL.SDL_WINDOWPOS_UNDEFINED,
SDL.SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL.SDL_WindowFlags.SDL_WINDOW_SHOWN);
IntPtr renderer = SDL.SDL_CreateRenderer(window, -1,
SDL.SDL_RendererFlags.SDL_RENDERER_ACCELERATED |
SDL.SDL_RendererFlags.SDL_RENDERER_PRESENTVSYNC);
And on SDL-Sharp like this:
SDL.Init(SdlInitFlags.Video);
Window window = SDL.CreateWindow("Window", SDL.WINDOWPOS_UNDEFINED, SDL.WINDOWPOS_UNDEFINED, 800, 600, WindowFlags.Shown);
Renderer renderer = SDL.CreateRenderer(window, -1, RendererFlags.Accelerated | RendererFlags.PresentVsync);
FAQs
Is a SDL2 for c# The wrapper provides bindings for the following libraries: - SDL2 (2.30.7) - SDL2_image (2.8.2) - SDL2_mixer (2.8.0) - SDL2_ttf (2.22.0) - Utils (functions that facilitate the development) And contains the necessary DLLs for the project in SDL-Sharp-DLL
We found that sdl-sharp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.