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

Author Topic: [Solved] Keyboard and Mouse with Ogre3d  (Read 855 times)

0 Members and 1 Guest are viewing this topic.

TheNess

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
[Solved] Keyboard and Mouse with Ogre3d
« on: February 07, 2015, 05:48:57 pm »
hello,

I'm working on an Ogre3d project and I want to use sfml for input only.
I have two questions:

1. can I use functions like sf::Keyboard::isKeyPressed() or sf::Mouse::getPosition() even if I have no SFML window at all and I'm not pulling events via sfml?
2. I'm trying to link statically and I linked to both System and Window libs, but visual studio still don't find sf::Keyboard nor sf::Mouse. (unresolved external symbol...) what do I need to link to in order to make it work?

PS I know the thread that shows how to combine Ogre3d with SFML but there he is creating SFML window and render on it and I rather not do that (since I only use SFML for keyboard & mouse)
thanks!
:)

EDIT: oops it was my mistake. forgot to add some static libs & preprocessor static_lib define.
« Last Edit: February 07, 2015, 05:54:55 pm by TheNess »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: [Solved] Keyboard and Mouse with Ogre3d
« Reply #1 on: February 07, 2015, 05:59:41 pm »
Quote
1. can I use functions like sf::Keyboard::isKeyPressed() or sf::Mouse::getPosition() even if I have no SFML window at all and I'm not pulling events via sfml?
It's clearly stated in the documentation.

Quote
2. I'm trying to link statically and I linked to both System and Window libs, but visual studio still don't find sf::Keyboard nor sf::Mouse. (unresolved external symbol...) what do I need to link to in order to make it work?
Static linking is explained in the tutorials.
Laurent Gomila - SFML developer