Sign in to follow this  
kuroioranda

OGRE with an SDL window and message loop

Recommended Posts

I'm currently looking into using OGRE for my future projects in lieu of directly calling OpenGL code from within an SDL based app, but one thing that really gets me down about OGRE is that the tutorials and faqs at the site don't really seem to indicate that it is possible to use anything other than the OGRE created window as your output device. Provided that I ensure I'm using the OpenGL rendering pipeline, I don't really see any technical reason that one wouldn't be able to have OGRE send output to an externally created window. My question is, is there any way to instruct OGRE to do so? The reason I want to do this is that I a fairly heavy investment in SDL specific code in my gamestate and input managing classes, and if at I possible I would like to be able to continue to use that code. Any help with this would be greatly appreciated. Everything I've seen so far about it's API and design philosophy makes OGRE look amazing.

Share this post


Link to post
Share on other sites
http://www.ogre3d.org/index.php?option=com_content&task=view&id=220&Itemid=2
Quote:

Many structural enhancements to the GLRenderSystem, including an extension manager, separation of window creation etc into a GLSupport class (to enable platform specific window management). Win32GLSupport added so Win32 no longer uses SDL for window management.

That's from version 0.11.0 release notes. However I know you can use SDL for input when using ogre.
EDIT: This link may also help http://www.ogre3d.org/wiki/index.php/Using_SDL_Input
It appears that it's usually not a good idea to put ogre in an SDL window and is suggested to tell SDL to use the OGRE window that is created. It includes sample code on how to do this.

Share this post


Link to post
Share on other sites
Thanks! I had found the first link but the second one was new. Sadly, it looks like getting SDL to use OGRE's window is even more work, so I'll just have to bite the bullet and do some refactoring.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this