SFML community forums
Bindings - other languages => DotNet => Topic started by: AF2013 on March 06, 2014, 11:27:35 pm
-
Hello Everyone,
I just download Visual Studio 2012 then SFML and to my surprise, I dont have messed about putting include files and Lib files folder like VS 2010 !! I just create a Project and I saw SFML then It installed and everythings done for me!
I am very happy when I just click run button to see what it does and it render Window with background Colours!
Now I want to know where I can learn C# SFML Documents and tutorials to help me speed up my programming :)
cheers
P.S. I hope I put in the right post in here as I need know where the C# SFML Documents and tutorials is :)
-
You can generate the documentation yourself (maybe it's also included in the SDK), and for tutorials I would consult the C++ version.
-
That is shame because C# is easier than C++ as you can tell the different in coding wise!
-
Where is the problem? The differences in the SFML tutorials will be small and mostly syntactical (apart from the missing modules in SFML.NET).
-
Can you please give me example of source example display image on screen for C# SMFL because for simple reason, I try to do in C# even thought there is lack of Documents for C# SMFL ! I dont want to learn C++ SMFL because I prefer C# better!
cheers
-
Here you go ;)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using SFML;using SFML.Graphics;namespace SFML
.Net_Test{ class Program
{ static void Main
() { RenderWindow window
= new RenderWindow
(new Window
.VideoMode(200,
200),
"test"); CircleShape cs
= new CircleShape
(100
.0f
); cs
.FillColor = Color
.Green; window
.SetActive(); while (win
.IsOpen()) { window
.Clear(); window
.DispatchEvents(); window
.Draw(cs
); window
.Display(); } } }}
-
If I may ask, how exactly did you get the C# bindings to work without crashing?
I downloaded the bindings for dotnet, used VS2013, and added the libraries, but it crashes if I make any call or reference to RenderWindow.
-
I had to add them directly to the project as normal files than changed the files' setting of Copy to Output Directory to Copy Always. If there is another way I'd love to hear it myself.
-
try tutorial : http://instilledbee.wordpress.com/2013/05/12/setting-up-sfml-net-2-0-to-work-with-visual-studio-2012-c-projects/