sdl and glx platform on linux

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
lgoss007
Halfling
Posts: 81
Joined: Sat Mar 29, 2003 7:29 pm
Location: Florida, USA
Contact:

sdl and glx platform on linux

Post by lgoss007 »

Does the GLX platform work on linux? If it does work, what is the reason for using SDL as the default? Can I use GLX instead of the SDL platform? Is there an easy way to replace SDL? Is there any reason I should stay away from GLX? Sorry for the many questions, I'm just curious.
User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

Post by fog »

GLX work perfetly well (and as wumpus said on IRC "you also get a nice config panel"). If your program already uses SDL it does make sense to stick with it (integrated input loop, etc.) but if you don't need SDL GLX is perfectly good and you even have one less dependency.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

The reason that SDL is the default is because it was there first :)

There's a couple of reasons to choose for GLX though:

- Hardware render-to-texture: this is currently only implemented for Win32 and GLX. This means you can have rtt's bigger than your framebuffer and in different pixel formats. Implementation for SDL is a bit troublesome for the release version of SDL, with the CVS version it's a breeze but we're still waiting for that to get released.

- A nice config panel (as fog says)

- Ctrl-alt-escape unlocks your mouse (so it can leave the window and is visible), clicking locks it in again

Use "--with-gl-support=GLX --with-platform=GLX" on configure to use the GLX system.
User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

Post by fog »

:wumpus: wrote: - Ctrl-alt-escape unlocks your mouse (so it can leave the window and is visible), clicking locks it in again
Alt-TAB does that on SDL.

Anyway, I started using GLX and I won't move back to SDL unless I need Joystick or a library that uses SDL.
User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

Embedding

Post by fog »

And not to forget, if I understand it correctly only the GTK platform let you embed an ogre rendering window into a top-level window. SDL and GLX always create a top level. (That makes sense for SDL but not for GLX; wumpus: is that a real limitation or just was not implemented?)
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Just not implemented yet. There is no way to pass in a parent window handle. When we do the new interface on createRenderWindow things will change.
lgoss007
Halfling
Posts: 81
Joined: Sat Mar 29, 2003 7:29 pm
Location: Florida, USA
Contact:

Post by lgoss007 »

Great! Just what I was hoping for. Will the createRenderWindow interface change before the 1.0 release? That would be nice, but I know you all are busy.
lgoss007
Halfling
Posts: 81
Joined: Sat Mar 29, 2003 7:29 pm
Location: Florida, USA
Contact:

Post by lgoss007 »

One more thing. Will this option:
"--with-gl-support=GLX --with-platform=GLX"
be added to the linux readme? Because I think it is a valuable option :D

I'd even do it myself and contribute a patch or whatever if that would help (and if I find out how to do patches in cvs).
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

lgoss007 wrote:Great! Just what I was hoping for. Will the createRenderWindow interface change before the 1.0 release? That would be nice, but I know you all are busy.
It's not on the official roadmap, but I need to change the interface/renderWindow parameter system anyway before I can implement FSAA for GLX.
User avatar
AnimalMachine
Gnoblar
Posts: 19
Joined: Sun Jan 19, 2003 4:36 pm
Location: Milwaukee, WI USA

Post by AnimalMachine »

Wow, that's cool. This should get added to configure's help somehow. When you look at it, it only mentions sdl and gtk for platforms.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

It's added the the ./configure help for -HEAD (1.0.0). I'll be sure to document in the Linux readme as well.
Post Reply