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

Author Topic: Comparison SFML vs SDL -> GUI and OGRE3D  (Read 16534 times)

0 Members and 1 Guest are viewing this topic.

N_K

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #30 on: September 22, 2012, 04:22:17 pm »
So you wanted to use SFML to handle input in your Ogre-based application?

In this case, you're doing it wrong. OIS is very well integrated into Ogre since many years, and is considered to be the de facto input system for OGRE. It even comes with the Ogre SDK. It is used in almost all Ogre games. It is more sophisticated than SFML's input system (since it's only purpose is to handle input), and supports many "exotic" devices.

Save yourself from a lots of (pointless) work, and just go with OIS. If you're experiencing some issues with it, head to the Ogre forum and report it there. The main OIS developer (pjcast on the Ogre forums) used to be a member of the Ogre development team, and although he retired now, there are many OIS-experts there.
« Last Edit: September 22, 2012, 04:24:08 pm by N_K »

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #31 on: September 22, 2012, 04:44:00 pm »
@laurent
Short, just wanted to set:
- WindowHandle
- windowClass.lpfnWndProc

Didn't want to start an endless discussion...
If you want to close this Thread its ok ;)
Doesn't look like i get what i wanted, so i should spend my short freetime in coding not in senseless discussions.

@N_K
  • OIS is using DirectInput as far as i know.
  • Its not integrated in Ogre its just delivered with it.
  • OIS uses the Ogre Windowhandle, nothing more

for the time being i stick with SFML :P

so close

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32434
    • View Profile
    • SFML's website
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #32 on: September 22, 2012, 05:57:07 pm »
Quote
Short, just wanted to set:
- WindowHandle
- windowClass.lpfnWndProc
Sorry but this is far from being clear, and I don't see the relation with inputs.

Is it so hard to clearly describe what features you would like to have? :P
You can write some pseudo-code if it can help.

Quote
Didn't want to start an endless discussion...
I said that because everybody seems to ask the same questions to you, and nobody really understands what you want ;)

Quote
OIS is using DirectInput as far as i know.
And? It's a good thing, DirectInput offers more features than the Win32 API.

Quote
Its not integrated in Ogre its just delivered with it.
SFML is even less integrated to Ogre ;)
And as long as they work fine together, what's wrong?

Quote
OIS uses the Ogre Windowhandle, nothing more
What else would you like it to use?
Laurent Gomila - SFML developer

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #33 on: September 22, 2012, 06:35:46 pm »
Quote
You can write some pseudo-code if it can help.
Its your window code ;)

e.g. if the window is not generated by SFML then the following is needed for input?:
- for the mouseposition the WindowHandle is needed?
- for keyboard, mouse the - windowClass.lpfnWndProc and called
void WindowImplWin32::processEvent(UINT message, WPARAM wParam, LPARAM lParam) is needed?

did i missed something thats needed for keyboard,mouse,joystick input?
Why not make it independent? What i did with picking out all mouse,keyboard functions.

Just my opinion. But i am not really familiar with the window system, so i could really missed something...
But at the moment it seems the mouse,keyboard works with just giving the WindowHandle and set the events in the WndProc.

Quote
I said that because everybody seems to ask the same questions to you, and nobody really understands what you want
Yes, i just wanted to leave this thread because i am not able to explain it (bad english), or maybe i should really use OIS. But i like the SFML code so much ;)

Quote
And? It's a good thing, DirectInput offers more features than the Win32 API.
I thought DirectInput is deprecated for keyboard and mouse? And additionaly i like it fast and simple :P


Quote
SFML is even less integrated to Ogre
And as long as they work fine together, what's wrong?
I cannot see that is something integrated? OIS is just so much independent that the WindowHandle is enough. I think (but don't know) that the DInput thread is catching the inputs?

Quote
What else would you like it to use?
blub, nothing ... but as we can see its possible to separate the window system from the input system.

But its your library and thats just my inexperienced opinion :P


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32434
    • View Profile
    • SFML's website
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #34 on: September 22, 2012, 06:44:38 pm »
A window is needed only where it is relevant, for example if you want to get the mouse position relatively to a window. But for global inputs, there's no need for a window, just take a look at the tutorials or the documentation of sf::Keyboard, sf::Mouse and sf::Joystick.

If you have a window and want to connect the event system of SFML to it (is that what you want to do??) then you can't do that with SFML.

OIS is indeed an independant library and can be combined easily with any other library if it can give you the window handle. So it integrates perfectly with Ogre, and could integrate as well with SFML or any other windowing library. It uses the best API that the OS provides (DirectInput is deprecated but it still works, and maybe they'll switch to XInput in the future, who knows?). So I fail to see why you don't want to use it, it seems to meet all your requirements.

I hope that I summarized things clearly enough :)
Laurent Gomila - SFML developer

noobie

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #35 on: September 22, 2012, 06:57:58 pm »
Well then SFML was the wrong choice. :(

Thx for such a clear answer ;)

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #36 on: September 24, 2012, 10:10:33 am »
Did not read all posts but i can say couple words (i worked with ogre, sfml, sdl, and many others).
Ogre : very large framework, not the way to start from (also it's always pain to export models)
sfml : easy and minimal (way to start from), you can use MyGUI, CEGUI, Magic Particles (very nice lib) and many others libraries, also it's easy to switch from 2d to 3d, just need to know some basics about matrices.
sdl : more advanced than sfml, it uses C, but it doesn't mean you can't write on C++, also you can attach any other library (C/C++)

If you want something simple 3d with editor try maratis3d.

P.S. the quality of graphics depends on artist skills

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9573
    • View Profile
    • development blog
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #37 on: September 24, 2012, 10:17:07 am »
sdl : more advanced than sfml, it uses C, but it doesn't mean you can't write on C++, also you can attach any other library (C/C++)
I hope you didn't mean the last part just for SDL...
You can attach any other library to any other application too.

Additionally I don't really see how SDL is 'more advanced'. It's just more popular. Or did you mean the programmer has to be more advanced to be able to work with it? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32434
    • View Profile
    • SFML's website
    • Email
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #38 on: September 24, 2012, 10:25:49 am »
Quote
Additionally I don't really see how SDL is 'more advanced'
It has more features. SFML is still quite minimal.
Laurent Gomila - SFML developer

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: Comparison SFML vs SDL -> GUI and OGRE3D
« Reply #39 on: September 24, 2012, 10:27:12 am »
Additionally I don't really see how SDL is 'more advanced'. It's just more popular. Or did you mean the programmer has to be more advanced to be able to work with it? ;)
Yes, sfml hides (or wrap) many things

 

anything