.Net wrapper for the Simple Fast Multimedia Library.
Questions tagged [sfml.net]
30 questions
3
votes
1 answer
What can cause a .NET Core binary to load a native library, then throw a DllNotFoundException?
I'm trying to run an SFML.NET game on MacOS having ported the game to .NET Core.
I have been unable to get SFML to load its native dependencies correctly at runtime, so I set up a minimal test example to try to isolate the issue, and still get the…

Ashley Davies
- 1,873
- 1
- 23
- 42
2
votes
1 answer
Whats differece between SFML Image.Pixels and FIle.ReadAllBytes
When I try to understand SFML, I tried to set an icon with RenderWindowInstanse.SetIcon()
the method, that takes 3 parameters, fist two is size, 3 - byte[], then I try to use File.ReadAllBytes()
and same tools in c#, but that don't work, I search…

eretey
- 23
- 3
2
votes
1 answer
C# .Net library cannot find dependencies on Linux
I am having issues with dependencies linking with my SFML.Net project:
I successfully imported the SFML.Net DLLs, and thus the program compiles without problems. But once I run it, it crashes, telling the following:
System.DllNotFoundException:…

Alex Gagne
- 21
- 2
1
vote
2 answers
SFML C# How do I switch between fullscreen?
I would like to switch between fullscreen and windowed mode. Is there some way to do that without restarting whole game?

Etwus
- 549
- 5
- 15
1
vote
1 answer
SFML: keep a RenderWindow's partial region unrefreshed
I am looking to get the same effect as the GraphicsPath from Winforms which allows to keep some particular areas of myForm unrefreshed. f.i.:
myForm.Invalidate(new Region(graphicsPath));
My final goal is to draw things at the unrefreshed location,…

KwentRell
- 416
- 1
- 4
- 17
1
vote
1 answer
Linux SFML - Cannot Open Shared Object File
Using Linux Mint 18 Cinnamon 64-Bit
I am having issues trying to get SFML to work. I am trying to compile from the command line with g++.
My file is /home/joe/Desktop/SFML/test/main.cpp
My SFML Folder is at /usr/lib/SFML-2.4.1
If I run g++ -c…

Joe G
- 99
- 1
- 14
1
vote
3 answers
How do I use text in SFML.NET?
I just downloaded SFML.NET and added a reference to the library DLLs included with it, but it seems the Text class is not there. In the example on the site, it is clear that a Text object being used... so the example won't compile. See for…

Dlaor
- 2,900
- 3
- 17
- 14
1
vote
3 answers
Unlimited number of bullets
I try to make shooter game on C# with SFML.NET, but I can`t imagine how to make an ability to shoot more than 1 bullet, because now I have just one null-object of bullet-class, and when player presses Space key this object gets link to the new…

CssHammer
- 66
- 7
1
vote
0 answers
Getting weird flickering in SFML.NET 2.2 when using views and drawing lots of stuff at the same time
I am using SFML.NET 2.2 (just upgraded from 2.1 which also had the same issue) and I got some weird behavior when rendering lots of stuff to the screen. It might also be somewhat related to using several views, I don't really know.
I did search for…

matsve
- 297
- 4
- 11
1
vote
1 answer
SFML C++ getSize() and sprite.move() in SFML.net
My first question is if C++:
pTexture.getSize().x
equals C# (because this is no result for me using this):
pTexture.Size().X
Second question is about C++ code (how to write in SFML.net this line).
pImage.move(0,-1)
pImage is Sprite and pTexture…

Jadwiga Śmiarowska
- 67
- 8
1
vote
2 answers
Can't find copy if newer button
I am learning how to use SFML.NET with Microsoft visual Studio 2014 with C# and I added the C# dll's found in the lib folder using add existing files on My solution.
I cannot however, find the copy if newer button in the dll's property anywhere.
All…

Prophoem
- 11
- 2
1
vote
1 answer
Copy IntPtr BRGA to RGBA byte[] With Marshal.Copy
Im currently copying a byte[] from a BGRA IntPtr Buffer using Marshal.Copy as follows:
private static byte[] getWebViewScreenshotAsBytes(ref WebView myWebView)
{
int colorLength = myWebView.Width * myWebView.Height;
…

anthr
- 719
- 5
- 13
1
vote
0 answers
Add mp3 support to SFML.NET
I'm currently working on an audiobackend for my application, which runs on Mono/.NET. Therefore I found, that SFML is plattformindependent, so it suits. But there is no mp3 support because of licensing.
So I wanted to add up the mp3 capability for…

Sven
- 447
- 1
- 6
- 22
1
vote
1 answer
Clicking on Sprite doesn't register
I have SFML.NET working fine, and wrote my own little scene manager. In the scene interface I have a method called "Update". I'm trying to see if the user has clicked on the play button or quit button, but I get nothing.
public void…

melotic
- 51
- 8
0
votes
2 answers
SFML C# - Texture is not repeated
In this example, the texture is not repeated. What could I have missed?
link: https://i.stack.imgur.com/lsEub.png
void Game_Draw()
{
window.Clear(Color.Black);
window.DispatchEvents();
RectangleShape r = new…

RAY
- 13
- 3