SFML.Net
SFML.Net copied to clipboard
Official binding of SFML for .Net languages
## What this PR does Adds a method `EnumerateEvents` to window. This returns an enumeration of "raw" events (that is, `IEnumerable`), which can be used in a `foreach` block of...
Addresses #222 * Updated Texture's constructors with an optional parameter named "sRGB" which selects between the sRGB and non-sRGB versions of sfTexture_create* * Allows Texture(byte[]) to specify a portion of...
Addresses #212 * Updated to use a `SIZE_T` "typedef" where CSFML is expecting `size_t` * `using SIZE_T = UIntPtr;` is at the beginning of each file that will P/Invoke functions...
Using p/invoke with `DllImportAttribute` is a bit cumbersome in a [cross-platform manner](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform). As such, it might make sense to use the [NativeLibrary class](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary?view=net-6.0) instead. ## References - https://learn.microsoft.com/en-us/dotnet/standard/native-interop/cross-platform - https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary?view=net-6.0...
Due to the way the CSFML API was implemented for creating/loading textures, there was no way to create textures in sRGB mode and the exposed setSrgb method was essentially useless....
Fixed binding signatures (which were originally broken by yours truly): ``` CSFML_WINDOW_API sfBool sfContext_isExtensionAvailable(const char* name); CSFML_WINDOW_API GlFunctionPointer sfContext_getFunction(const char* name); ``` Removed old bindings that don't exist anymore in...
# Issue description While running a `RenderWindow` instance, any `KeyPress` event results in throwing a `System.AccessViolationException`. # How to reproduce Run the example project in `example/window`, and press any key...
Making this draft as a starting point for Span-related changes. This might also be a good place to look over some memory allocations happening in the library. The idea is...