Horde3D http://horde3d.org/forums/ |
|
Horde3D with SFML ( Example ) http://horde3d.org/forums/viewtopic.php?f=1&t=221 |
Page 1 of 1 |
Author: | Mikmacer [ 17.01.2008, 05:54 ] |
Post subject: | Horde3D with SFML ( Example ) |
For those who don't know what is SFML, it is a portable library like the SDL but it is build with OpenGL so its a lot more faster than the SDL to create 2D games! It can be an alternative to the SDL to show horde 3D. Personally, I use this library because I found it a lot easier to use than the SDL and it support a lot of thing like network, audio, multithread and soon a GUI. Ive made an exemple wich you are free to use: Download here This exemple is the knight exemple wich work exactly like ine SDL exemple ( WASD to move, F1: full screen, etc. ). The "app" class remain exactly the same but the main one is changed to use SFML. The project was made in Visual studio with the windows libraries, and all path are relative. If you want to compile the example, you must right click on "Horde-SFML" in the Solution Explorer, and then left click on "Build". To execute it, go to the release dirctory and execute the executable named "Horde-SFML.exe". Ive added all SFML libraries in the project, but in this exemple, it only use two wich are the "sfml-main.lib" and "sfml-window.lib". You can't compile in debug mode in this project. I don't know if there are a FPS difference between SDL and SFML with horde, but its surely not noticeable. If you want more information about SFML, you can click here |
Author: | AcidFaucet [ 17.01.2008, 07:35 ] |
Post subject: | |
I'm have no idea what you mean with SFML being built with OpenGL while SDL is not. Playing around with your demo there appear to be some issues with SFML's input handling code. Try moving back and forth, could just be me, but stuttering on a 3.5ghz Pentium D with 4gb ram and an 8800GTX can't be good. Also try hitting CTRL+ALT+DELETE and see what happens to your input. It's thoroughly broken for me. There's also an overall framerate drop. 80 to 90 percent processor usage with SFML vs. 30-50% with SDL. But all of this could be caused by either your code or SFML not being multi-core friendly. Or it could be me. SFML's audio capabilities are more complete than SDL's though and look worthy of being torn out for independent use. |
Author: | Mikmacer [ 17.01.2008, 14:25 ] |
Post subject: | |
O mean that SFML use OpenGL for his rendering system while SDL not. It's why its more quickly if you want to make 2D game with SFML( it has been tested : link ) Maybe I'm wrong, but it's what ive heard. For the framerate drop, I cant say since SDL exemple is limited to 60 FPS on my PC while SFML is not. For the input, I don't have time to check this now, but it work well for me. Does everyone who have tried this exemple have the same problems? |
Author: | marciano [ 17.01.2008, 21:31 ] |
Post subject: | |
Thanks for the port, it is nice to see the Horde samples working with SFML. When we made the engine cross-platform compatible my first idea was to use this library. But although it claims to be leightweight the size of the lib files was still quite large. So we opted for SDL. Well, due to some problems with SDL the next version of Horde will run on GLFW. I tested it on Linux today and everything works very well. Furthermore GLFW is quite a bit smaller than SDL, e.g. it just requires one header file insterad of twenty or so |
Author: | oh8gnz [ 11.07.2009, 16:37 ] |
Post subject: | Re: Horde3D with SFML ( Example ) |
I'm interested in using SFML with Horde3D but I can't find any useful tips where to start. That example link proviced by micmacer doesn't work. If anybody has anything useful for a beginner, I would appreciate. |
Author: | marciano [ 12.07.2009, 08:45 ] |
Post subject: | Re: Horde3D with SFML ( Example ) |
I haven't seen Mikmacer around for some time but maybe you can try to pm him and ask if he still has the code. |
Author: | Mikmacer [ 12.07.2009, 19:06 ] |
Post subject: | Re: Horde3D with SFML ( Example ) |
I don't have this example anymore, but it is not something really hard to do. All you need is the OpenGL context given by SFML, and you have an example of this here : http://www.sfml-dev.org/tutorials/1.5/window-opengl.php . Instead of using openGL to draw something, you can call the horde3D drawing function wich will handle opengl calls for you. |
Author: | oh8gnz [ 12.07.2009, 19:07 ] |
Post subject: | Re: Horde3D with SFML ( Example ) |
ok.. I'll try.. |
Author: | Hannofcart [ 19.08.2011, 21:19 ] |
Post subject: | Re: Horde3D with SFML ( Example ) |
I rewrote the main.cpp of the Chicago sample with SFML instead of GLFW. Note that some of the key input code is a bit of a kludge to play nicely with the sample application code. You can find the sample at the community wiki. Hope this helps some of the others stumbling onto this post like I did. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |