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

Author Topic: Integrating OGRE with SFML  (Read 4570 times)

0 Members and 1 Guest are viewing this topic.

Mako_energy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Integrating OGRE with SFML
« on: January 10, 2010, 09:35:51 am »
I have looked all around the internet seeing if I could find some guide for integrating the two.  For the most part, I have only seen scattered comments on this forum, OGRE's forum, and Gamedev.net's forum saying that it is possible...but no one can seem to tell me in detail about how to go about it.  Pretty much the only thing I have been told is that you need the window handle, but not really any examples of implementing it.

If I simply fail at searching then I apologize.

Ideally I just want a tutorial or examples explaining how this is done.

Mako_energy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Integrating OGRE with SFML
« Reply #1 on: January 11, 2010, 01:55:51 am »
Doing more and more reading, I'm not so sure even a window handle is necessary to integrate OGRE within a SFML window.  Which means I'm slightly more lost then I was before.  

Laurent, I'm aware that you are very active on the forums.  Have you not attempted to do this before?  Can you at least lend me some insights?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Integrating OGRE with SFML
« Reply #2 on: January 11, 2010, 08:22:24 am »
Quote
Have you not attempted to do this before?

No, I don't see any reason for trying this. OGRE provides everything that SFML does and much more.

Quote
Can you at least lend me some insights?

There are discussions here and on the OGRE forums about this problem, you may find a solution there. But I don't think that it is possible: both SFML and OGRE will use their own OpenGL context for the same window, and they may conflict.
Laurent Gomila - SFML developer

Mako_energy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Integrating OGRE with SFML
« Reply #3 on: January 11, 2010, 08:59:23 am »
OGRE has some basic capabilities that match some of what SFML does in function, however I feel many of those things are better implemented in SFML...input especially.

We currently have SDL running with OGRE, but again, we feel a few things were implemented better in SFML.  Our primary reason for wanting to go with SFML is you have libraries that do a large number of things and we want to use as few libraries as we can get away with without cutting functionality so we can minimize configuration and potential conflicts.

I'll look around some more and if I find anything I'll be sure to share.  Thanks for the response.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Integrating OGRE with SFML
« Reply #4 on: January 11, 2010, 09:14:11 am »
Have you looked at OIS? This is the recommanded library for input handling with OGRE, it offers much more features than SFML.
Laurent Gomila - SFML developer

Mako_energy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Integrating OGRE with SFML
« Reply #5 on: January 11, 2010, 09:34:39 pm »
Yes, we looked at OIS first for input handling.  The project seems to have weakened somewhat.  Their forums aren't active, and I can't seem to find any documentation for it on their sourceforge page.  As a result we decided against using it early on.  OIS seemed to have a few flaws as well, for example it didn't differentiate between either shift key or holding shift.  There was just shift.  Your input system almost perfectly matches our needs, closer then any other library we have found.

Currently we have SDL doing windowing and input.  I don't think OGRE needs to actually have the OpenGL Context.  I believe it can be just left to rendering.  I base this on the article that explains how to go about embedding OGRE (for just rendering) into a SDL window.

http://www.ogre3d.org/wiki/index.php/Using_SDL_Input#New.2C_Experimental_Way_.28OGRE_v1.6_and_Later.29

Thats currently what I am familiarizing myself with and I'll take a look at parts of your code to see if something similar can be done with your library.  Of course any insights of your own would be greatly appreciated.

 

anything