Page 1 of 1

sdl and glx platform on linux

Posted: Wed Jan 05, 2005 12:10 am
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.

Posted: Wed Jan 05, 2005 4:12 pm
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.

Posted: Wed Jan 05, 2005 5:16 pm
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.

Posted: Wed Jan 05, 2005 5:48 pm
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.

Embedding

Posted: Wed Jan 05, 2005 5:55 pm
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?)

Posted: Wed Jan 05, 2005 5:59 pm
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.

Posted: Wed Jan 05, 2005 7:08 pm
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.

Posted: Sat Jan 08, 2005 12:37 am
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).

Posted: Sat Jan 08, 2005 1:41 am
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.

Posted: Sun Jan 09, 2005 4:56 am
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.

Posted: Sun Jan 09, 2005 5:18 pm
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.