Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: dxSFML  (Read 7335 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
dxSFML
« on: March 12, 2013, 11:42:36 am »
Hi All

Some of you might know that we use SFML to develop casino style games for touch-screen terminals.
We're having a problem with one terminal we use, where it doesn't support OpenGL correctly for various reasons, the main one being they use a "hook" to overlay their own graphics. The people who own the terminals can update them, but it will take them a very long time.

So, the only solution we have is to use DirectX. Given that our entire game engine is built around SFML, this is not good news :(

Do people think it's reasonable to "just" replace the window management/draw calls in SFML to use DirectX but keep all non-window/graphics code the same?

Is this actually possible? We are actually prepared to pay someone to do this project - and then we will release the modified source code to the SFML community. We need to resolve this problem, and if it costs money, then OK. Are there any people interested? ;)

Ed
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: dxSFML
« Reply #1 on: March 12, 2013, 11:59:33 am »
I think that the best solution is to use ANGLE, an OpenGL implementation that converts OpenGL calls to DirectX calls. It is not directly usable though, because it's an OpenGL ES 2.0 implementation.

However it's still much better than providing a DirectX backend to SFML, because:
- porting SFML from OpenGL to OpenGL ES 2 is much simpler
- it has to be done anyway in a near future, to support iOS and Android

I didn't plan to work on it before a few months (not before SFML 2.2 at least), but if it's really important for your business we can maybe find a compromise. What's your deadline?

By the way, could you tell us more about your company and the games that you do? :)
Laurent Gomila - SFML developer

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: dxSFML
« Reply #2 on: March 12, 2013, 12:10:13 pm »
Another solution other than modifying SFML would be to redesign your code so you can easily swap out the back end between SFML/DirectX. Define a interface that would be similar to SFML and then implement that interface in two forms, one form for SFML and one for DirectX. And then in the future if you want to swap out the back end all you need to do is change which back end implementation you use in your code.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Vovosunt

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: dxSFML
« Reply #3 on: March 12, 2013, 12:33:15 pm »
I think that the best solution is to use ANGLE

Just read a bit up on ANGLE and WOW. Do it.
I think one of the main things  why people don't choose SFML for their games is due to it not supporting directX
(mostly because it is said that directX has better driver support and runs better on windows).
And having SFML for Android would be just plain awesome! :D


On the side-note: would it be possible to use latest directX stuff with Angle?
Maybe DirectX.hpp for SFML (just like OpenGL.hpp)?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: dxSFML
« Reply #4 on: March 12, 2013, 12:43:41 pm »
Quote
I think one of the main things  why people don't choose SFML for their games is due to it not supporting directX
(mostly because it is said that directX has better driver support and runs better on windows).
This is wrong, or at least exaggerated. It's true only if you don't install drivers for your graphics card, and run with the software OpenGL implementation of the OS. I don't know anybody who does that -- and even if I find one, I would tell him to upgrade his driver, not to switch to DirectX.
As long as you install the graphics drivers provided by your graphics card manufacturer, everything is fine and you don't need DirectX.

Quote
would it be possible to use latest directX stuff with Angle?
What does "latest DirectX stuff" means? DirectX is just the implementation detail, what you can use with ANGLE is the OpenGL ES 2.0 API, nothing more.

Quote
Maybe DirectX.hpp for SFML (just like OpenGL.hpp)?
??
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: dxSFML
« Reply #5 on: March 12, 2013, 12:52:53 pm »
Hi Guys

To answer the questions:

1. We are a small team of 7 guys currently - our website should give you a better idea of what we do (http://betdigital.net/). Basically, we make casino slot-machine games and systems which are on around 25,000 terminals (of many different types) in the UK and some other countries, e.g. Mexico & Columbia.

2. For the DirectX project, we have a deadline of June - but obviously the sooner the better as it will a lot of testing.

Laurent maybe we can talk off-forum about this? We really want to support SFML as it is very important to what we do :)

Ed
SFML 2.1

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: dxSFML
« Reply #6 on: March 12, 2013, 01:33:41 pm »
Although, isn't OpenGL ES shader based? If so, some platforms we use don't support shaders at all :(
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: dxSFML
« Reply #7 on: March 12, 2013, 02:00:16 pm »
Nice games. I'm glad they are based on SFML ;)

Quote
Laurent maybe we can talk off-forum about this?
Sure. E-mail or PM are both fine for me.

Quote
Although, isn't OpenGL ES shader based? If so, some platforms we use don't support shaders at all
OpenGL ES 2.0 is shader-based, yes.
What kind of platform do you use that don't support them? Do they support DirectX 9 shaders?
Laurent Gomila - SFML developer

therocode

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • Development blog
Re: dxSFML
« Reply #8 on: March 24, 2013, 02:40:03 pm »
I too would like to lobby for the importance of openGL ES support in sfml. :)

I've been waiting for this for a long time since I'd be eager to make sfml work on the open pandora platform which is quite game oriented so such a library would fit very well on it. And i'm sure there are other mobile platforms and things like NaCl for chrome that would really make this library cover new ground!

Cheers!