How do you go about "properly" setting up SFML for VS 2013? While a few places have given me a bit of information how to do it, nothing quite seems to work except one thing: SFML MS2012 Extension. However, I'd like to know how to do this from scratch for VS 2013 without the need of the extension.
Here is the current process I am using without the extension:
1) Open new project in VS 2013.
2) Add References to SFML libs(dlls): sfml-audio-2, afml-graphics-2 and sfml-windows-2.
3) Add extended libs via add-existing files: csfml-audio-2, csfml-graphics-2, csfml- windows-2, libsndfile-1 and openal32.
4) Create application.
Between the extension and doing everything myself, the noticeable difference is the GUID in the assembly information, yet if I attempt the previous steps and insert the GUID from the extension project into the new project, my attempt still fails to work even though the projects end up looking exactly the same. On top of which, where does the GUID come from and how do I go about getting it?
Secondary Question: Does XNA have all of the audio/graphic/window handling as SFML does? If so would it be better to switch to XNA than use SFML.Net?
SFML.net is now set-up for your project. To test it you can run this example code:
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using SFML; using SFML.Graphics; using SFML.Window; namespace SFML_Test { static class Program { static void OnClose(object sender, EventArgs e) { // Close the window when OnClose event is received RenderWindow window = (RenderWindow)sender; window.Close(); } static void Main() { // Create the main window RenderWindow app = new RenderWindow(new VideoMode(800, 600), "SFML Works!"); app.Closed += new EventHandler(OnClose); Color windowColor = new Color(0, 192, 255); // Start the game loop while (app.IsOpen()) { // Process events app.DispatchEvents(); // Clear screen app.Clear(windowColor); // Update the window app.Display(); } //End game loop } //End Main() } //End Program }
I have set up my SFML.Net projects in Visual Studio 2013 and 2015 through this tutorial . I used some of the text from it for this answer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.