wxWindows

(I just found that there is a newsgroup associated with this mailing
list. That explains a lot :).

I’ve been using SDL as the environment for OpenGL programming, with
great satisfaction. Now I need to start thinking about GUIfying my
code. The range of toolkits available is mind-boggling ™, but
wxWindows looks like a good contender. So now I’m thinking about
(Linux/Windows) + wxWindows + SDL + OpenGL. Does this make sense? I
really like SDL, but if I’m going to use wxWindows for the GUI stuff, do
I still need SDL? I’m using SDL to do graphical things, no sound. If
my question is a bit vague, it’s because I don’t have a good grasp of
how SDL and wxWindows would interoperate, or of GUI coding in general
(among other things).

thanks for any advice
Gib

(I just found that there is a newsgroup associated with this
mailing list. That explains a lot :).

I’ve been using SDL as the environment for OpenGL programming, with
great satisfaction. Now I need to start thinking about GUIfying my
code. The range of toolkits available is mind-boggling ™, but
wxWindows looks like a good contender. So now I’m thinking about
(Linux/Windows) + wxWindows + SDL + OpenGL. Does this make sense?
I really like SDL, but if I’m going to use wxWindows for the GUI
stuff, do I still need SDL? I’m using SDL to do graphical things,
no sound.

I have very little experience with wxWindows, but if they have an
OpenGL widget (which many toolkits have these days), you’d probably
get away with only wxWindows and OpenGL.

If you’re still interested in running fullscreen, running on svgalib,
GGI, fbdev, DirectX etc, using SDL might still be a good idea, but
since you’re using OpenGL, it might be better to just separate the
OpenGL stuff out into a lib of some kind, and just provide two
"hosts" for it; one windowed wxWindows based one, and one using SDL.

If my question is a bit vague, it’s because I don’t have
a good grasp of how SDL and wxWindows would interoperate, or of GUI
coding in general (among other things).

I think you would have to use the window ID hack for this. That is,
instead of SDL setting up it’s own window, you pass it one by ID
through an environment variable named SDL_WINDOWID. Whether or not
this works with OpenGL is another matter; I frankly have no idea.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se —On Saturday 25 January 2003 00.22, Gib Bogle wrote:

X11_GL_GetVisual notices SDL_windowid and uses it, just as X11_CreateWindow
does, so the problem reduces to letting SDL know about a window that some
window manager already created, as Sam does in his gtk-demo:

char SDL_windowhack[32];
	sprintf(SDL_windowhack,"SDL_WINDOWID=%ld",
		GDK_WINDOW_XWINDOW(mainwin->window));
	putenv(SDL_windowhack);

Sam calls this a hack, and that’s accurate.

I thought I’d be lazy and just modify Sam’s demo to initialize and render
with OpenGL, but it doesn’t work that way. You have to teach GTK (in this
case) about OpenGL and I haven’t discovered the one true way to do that.
Here’s one possibility:

http://gtkglext.sourceforge.net/

Regards,

DanielOn Saturday 25 January 2003 02:40, you wrote:

On Saturday 25 January 2003 00.22, Gib Bogle wrote:

If my question is a bit vague, it’s because I don’t have
a good grasp of how SDL and wxWindows would interoperate, or of GUI
coding in general (among other things).

I think you would have to use the window ID hack for this. That is,
instead of SDL setting up it’s own window, you pass it one by ID
through an environment variable named SDL_WINDOWID. Whether or not
this works with OpenGL is another matter; I frankly have no idea.

Hello,

This is just a sugestion. No need to use wxWindows. There are some
toolkits built on top of OpenGL (GLOW, GLUI, etc) and some widgets made
for opengl (I just read it on the net, you’ll have to search and
explore) called glWindows (I saw on a screenshot, themeable buttons,
checkboxes, etc). I don’t now about it (glWindows). As for the other
two, they’re just like wxWindows, but built on top of GLUT for OpenGL. I
don’t know much about it, I suggest you go exploring =). ThanQ,

    JVFF

David Olofson wrote:>On Saturday 25 January 2003 00.22, Gib Bogle wrote:

(I just found that there is a newsgroup associated with this
mailing list. That explains a lot :).

I’ve been using SDL as the environment for OpenGL programming, with
great satisfaction. Now I need to start thinking about GUIfying my
code. The range of toolkits available is mind-boggling ™, but
wxWindows looks like a good contender. So now I’m thinking about
(Linux/Windows) + wxWindows + SDL + OpenGL. Does this make sense?
I really like SDL, but if I’m going to use wxWindows for the GUI
stuff, do I still need SDL? I’m using SDL to do graphical things,
no sound.

I have very little experience with wxWindows, but if they have an
OpenGL widget (which many toolkits have these days), you’d probably
get away with only wxWindows and OpenGL.

If you’re still interested in running fullscreen, running on svgalib,
GGI, fbdev, DirectX etc, using SDL might still be a good idea, but
since you’re using OpenGL, it might be better to just separate the
OpenGL stuff out into a lib of some kind, and just provide two
"hosts" for it; one windowed wxWindows based one, and one using SDL.

If my question is a bit vague, it’s because I don’t have
a good grasp of how SDL and wxWindows would interoperate, or of GUI
coding in general (among other things).

I think you would have to use the window ID hack for this. That is,
instead of SDL setting up it’s own window, you pass it one by ID
through an environment variable named SDL_WINDOWID. Whether or not
this works with OpenGL is another matter; I frankly have no idea.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -’
http://olofson.nethttp://www.reologica.se


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
.

This is just a sugestion. No need to use wxWindows. There are some
toolkits built on top of OpenGL (GLOW, GLUI, etc) and some widgets made
for opengl (I just read it on the net, you’ll have to search and
explore) called glWindows (I saw on a screenshot, themeable buttons,
checkboxes, etc). I don’t now about it (glWindows). As for the other
two, they’re just like wxWindows, but built on top of GLUT for OpenGL. I
don’t know much about it, I suggest you go exploring =). ThanQ,

I asked about this on SlashDot recently:

http://ask.slashdot.org/article.pl?sid=02/12/24/1813219&mode=thread

After poking around for a while, I’ve settled on wxWindows.

The pure-GL solutions like PUI and GLUI and GLOW each present a
consistent appearance on each platform, since they render within the
OpenGL window using their own code (well, popups are handled via glut in
GLUI and GLOW, so they look like crap; PUI does its own popups, but they
still look like crap). If this is what you want, go for it. In my case,
I want my app to look native on each platform, so wxWindows was the way
to go.

wxWindows uses native widgets on the supported platforms, unlike Qt which
emulates the widgets (it does a spiffy job-- dunno if it’s better than
Java in that or not). As well, wxWindows just released a new version and
now supports MacOS 9.x, MacOS X, Win32, Gtk, and Motif. Oh-- and
wxWindows is about ten years old, so it is very mature (well, for an Open
Source project), and has a huge userbase.

Just my $0.02.

-Roy

After poking around for a while, I’ve settled on wxWindows.

The pure-GL solutions like PUI and GLUI and GLOW each present a
consistent appearance on each platform, since they render within the
OpenGL window using their own code (well, popups are handled via glut in
GLUI and GLOW, so they look like crap; PUI does its own popups, but they
still look like crap). If this is what you want, go for it. In my case,
I want my app to look native on each platform, so wxWindows was the way
to go.

Does wxWindows play well with SDL? I haven’t tried it, but it looks to me
like wxWindows wants to create your windows for you and take over the main
event loop. GTK wants to do that too, which is why I’m not that interested
in using it. It makes no sense to me that a widget set should grab control
of your main program, just to make you do workarounds to make it seem like
that didn’t happen. QT seems to at least recognize this problem and provide
some support for coexistence with applications that want to run their own
event loop. FLTK on the other hand, does what I think a widget set should,
and is quite happy to completely stay out of the way of your application,
letting you create the OpenGL surface with SDL and run the main loop yourself:

http://www.turricane.org/~wizard/projects/fltk-demo/

I don’t know if FTLK can use native widgets. I think it can use native MS
Windows widgets, but I don’t have a Windows system and haven’t verified this.

I do very much like the way FTLK interacts with SDL and I like the way it
looks, so for me FTLK is looking very promising. The way I see it, a widget
set should just be a widget set and not try to take over the world.

wxWindows uses native widgets on the supported platforms, unlike Qt which
emulates the widgets (it does a spiffy job-- dunno if it’s better than
Java in that or not). As well, wxWindows just released a new version and
now supports MacOS 9.x, MacOS X, Win32, Gtk, and Motif. Oh-- and
wxWindows is about ten years old, so it is very mature (well, for an Open
Source project), and has a huge userbase.

For a game, native widgets aren’t important imho, they just need to work
work in the expect way and look good.

Like everybody else, I’m feeling my way through this.

Regards,

DanielOn Monday 27 January 2003 15:54, Roy Wood wrote:

Does wxWindows play well with SDL? I haven’t tried it, but it looks to me
like wxWindows wants to create your windows for you and take over the main
event loop.

Yup-- that’s what it wants.

If you are interested solely in a GUI you can embed in an SDL window,
then you’re probably headed for ParaGUI: http://www.paragui.org/

I’ve investigated this for a while, and come to the conclusion that:

  • If you want to use SDL to generate a single-frame app, and want some
    GUI elements in there, then ParaGUI is the best solution

  • If you want a free beer/speech cross-platform app that uses native
    widgets, then wxWindows is the way to go

  • If you want a cross-platform solution that is commercially-supported,
    then Qt is the answer (doesn’t really use native widgets though-- it
    emulates them) (and yes, Qt is free too, unless you are planning to sell
    the results of your work)

Each of the above allows you to embed an OpenGL rendering sub-window in
your app (actually, wxWindows and Qt let you embed several-- dunno about
SDL, since I never tried that!)

If you want to use glut as your cross-platform solution, then look at
GLUI, PUI, and GLOW. There are some nice things about each one, and no
clear winner.

It makes no sense to me that a widget set should grab control
of your main program

Well, Gtk is not just a widget set-- it really is an app framework. If
you really just want a pluggable widget set for SDL, then you probably
want ParaGUI.

FLTK on the other hand, does what I think a widget set should,
and is quite happy to completely stay out of the way of your application,
letting you create the OpenGL surface with SDL and run the main loop
yourself:

http://www.turricane.org/~wizard/projects/fltk-demo/

Yeah, a lot of people had good stuff to say about FLTK. The fact that it
has its own unique UI killed it for me though, since that is not what I
wanted. It sounds great for your needs though, so Choice Is Good. :slight_smile:

-Roy

“Disclaimer ? The opinions expressed in this message are strictly
personal and do not necessarily reflect those of FiLogix.”

Roy Wood wrote:

Does wxWindows play well with SDL? I haven’t tried it, but it looks to me
like wxWindows wants to create your windows for you and take over the main
event loop.

Yup-- that’s what it wants.

If you are interested solely in a GUI you can embed in an SDL window,
then you’re probably headed for ParaGUI: http://www.paragui.org/

I’ve investigated this for a while, and come to the conclusion that:

  • If you want to use SDL to generate a single-frame app, and want some
    GUI elements in there, then ParaGUI is the best solution

  • If you want a free beer/speech cross-platform app that uses native
    widgets, then wxWindows is the way to go

  • If you want a cross-platform solution that is commercially-supported,
    then Qt is the answer (doesn’t really use native widgets though-- it
    emulates them) (and yes, Qt is free too, unless you are planning to sell
    the results of your work)

Each of the above allows you to embed an OpenGL rendering sub-window in
your app (actually, wxWindows and Qt let you embed several-- dunno about
SDL, since I never tried that!)

If you want to use glut as your cross-platform solution, then look at
GLUI, PUI, and GLOW. There are some nice things about each one, and no
clear winner.

It makes no sense to me that a widget set should grab control
of your main program

Well, Gtk is not just a widget set-- it really is an app framework. If
you really just want a pluggable widget set for SDL, then you probably
want ParaGUI.

FLTK on the other hand, does what I think a widget set should,
and is quite happy to completely stay out of the way of your application,
letting you create the OpenGL surface with SDL and run the main loop
yourself:

http://www.turricane.org/~wizard/projects/fltk-demo/

Yeah, a lot of people had good stuff to say about FLTK. The fact that it
has its own unique UI killed it for me though, since that is not what I
wanted. It sounds great for your needs though, so Choice Is Good. :slight_smile:

Thanks for that concise summary of the pros and cons of the choices.
BTW, the ParaGUI site seems to be off the air at the moment.

Gib

If you are interested solely in a GUI you can embed in an SDL window,
then you’re probably headed for ParaGUI: http://www.paragui.org/

I just built it and ran the tests. I agree, it looks good for in-game use.
However, as you say, it’s for embedding in a window and that’s not what I’m
looking for at the moment. I’m looking for a pretty standard widget set, to
run outside the OpenGL surface and provide controls for editing, or more
immediately, to select options for my OGL demos. I don’t want that interface
to look like a game, as Paragui does.

Yeah, a lot of people had good stuff to say about FLTK. The fact that it
has its own unique UI…

It does? I just ran all the demos and came away feeling like I just used a
very typical interface. I dimly remember trying it a year or so ago and
thinking it felt kind of funky, so either it changed or I did. I’ll bet on
the first one.

I’m walking through the FLTK code now, and it looks like, being C++, and with
the hooks apparently in the right places, you could subclass the widgets and
make it draw in-frame if you wanted.

Right now FTLK 1.2 is solid and FLTK 2 is in development, so it’s a great
time to get into it - no hassles, and the chance to influence the design
process, especially regarding this in-frame use.

One more point about FTLK I should mention: it’s C++, just like all the
widget sets except GTK. That’s a point in favor of GTK, since I have not yet
introduced any dependency on C++, and as soon as I do it’s pretty much
goodbye, C. I don’t know if that should worry me, except that just today I
had to switch back to gcc 2.95.4 to get rid of bizarre linker errors
compiling FLTK, and I dunno. Being C++ is also a point in favor of FLTK,
since C++ architectures seem to advance more rapidly and handle complex
situations better than C programs, while only being a little more bloated in
the hands of a good designer. Note: I’m not trying to do a sales job for
FLTK here, I’m trying to find the right tool for the job without too much
backtracking.

Erm, did I mention FLTK is fast and solid, and the libraries build in a
couple of minutes on this wimpy laptop?

…killed it for me though, since that is not what I
wanted. It sounds great for your needs though, so Choice Is Good. :slight_smile:

Yep, but confusion is not, and this is all very confusing. The big problem
is all the overlap and potential collisions between feature sets.

Regards,

DanielOn Monday 27 January 2003 21:51, Roy Wood wrote:

I think that a lot of programs that are being done in SDL would be
better done using a toolkit like wxWindows with OpenGL or DirectX
wigets. What I’m talking about are programs that look a lot like normal
GUI program but happen to have 1 or more animating 2d or 3d windows.
Those programs are best done using a graphics tool kit that has an
OpenGL or DirectX wiget.

I’ve seen some really nice 3D + GUI applications done 90% in TCK/TK with
the OpenGL widget and a small amount of C/C++ code tacked on for
performance. Works great, takes very little time to develop.

On the other hand there are programs that are more like traditional
games where nothing on the screen looks like a Windows/Mac/GNOME/KDE…
GUI application. Those programs are best done in something like SDL, or
DirectX where you can draw whatever you want.

The problem is that people tend to learn one or the other and then try
to use the hammer they know to drive screws. Not all tools are
appropriate for all jobs, even when they look like they should be.

	Bob PendletonOn Mon, 2003-01-27 at 10:18, Daniel Phillips wrote:

On Monday 27 January 2003 15:54, Roy Wood wrote:

After poking around for a while, I’ve settled on wxWindows.

The pure-GL solutions like PUI and GLUI and GLOW each present a
consistent appearance on each platform, since they render within the
OpenGL window using their own code (well, popups are handled via glut in
GLUI and GLOW, so they look like crap; PUI does its own popups, but they
still look like crap). If this is what you want, go for it. In my case,
I want my app to look native on each platform, so wxWindows was the way
to go.

Does wxWindows play well with SDL? I haven’t tried it, but it looks to me
like wxWindows wants to create your windows for you and take over the main
event loop. GTK wants to do that too, which is why I’m not that interested
in using it. It makes no sense to me that a widget set should grab control
of your main program, just to make you do workarounds to make it seem like
that didn’t happen. QT seems to at least recognize this problem and provide
some support for coexistence with applications that want to run their own
event loop. FLTK on the other hand, does what I think a widget set should,
and is quite happy to completely stay out of the way of your application,
letting you create the OpenGL surface with SDL and run the main loop yourself:

http://www.turricane.org/~wizard/projects/fltk-demo/

I don’t know if FTLK can use native widgets. I think it can use native MS
Windows widgets, but I don’t have a Windows system and haven’t verified this.

I do very much like the way FTLK interacts with SDL and I like the way it
looks, so for me FTLK is looking very promising. The way I see it, a widget
set should just be a widget set and not try to take over the world.

wxWindows uses native widgets on the supported platforms, unlike Qt which
emulates the widgets (it does a spiffy job-- dunno if it’s better than
Java in that or not). As well, wxWindows just released a new version and
now supports MacOS 9.x, MacOS X, Win32, Gtk, and Motif. Oh-- and
wxWindows is about ten years old, so it is very mature (well, for an Open
Source project), and has a huge userbase.

For a game, native widgets aren’t important imho, they just need to work
work in the expect way and look good.

Like everybody else, I’m feeling my way through this.

Regards,

Daniel


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-----------------------------------+

I just installed FLTK on W2000. I built and tested the OpenGL samples,
and they look OK. But I have run into what appears to be a limitation.
Adding glutFullScreen() to a demo program makes it almost, but not
quite, full screen. The Windows toolbar is left on the screen, as is
the Office bar on the right edge. I can’t see how to display the OpenGL
scene on a bare screen, which I need. If you know how to do this,
please let me know. (Should we take this non-SDL discussion off the
list?).

Gib

It’s not a non-SDL discussion yet :slight_smile:

Glut doesn’t go fully-fullscreen on Linux either. Anyway, glut is simply the
wrong interface for me. Its widget set has a tiny fraction of the
functionality of FLTK’s and has only one mode of operation: embedded in the
OpenGL surface. FLTK looks capable of running either in the OpenGL surface
or outside, or both at the same time. (Note: I have not tried this yet, but
soon.)

It may be a small thing, but I don’t like having the widget set run my event
dispatch loop for me. My application is not widget-centric, it is rendering
and realtime response-centric, so I want to run the main loop myself thanks.
FLTK lets me do this, glut does not.

Running the dispatch loop myself instead of letting the widget set do it
makes a bunch of interface glue go away. I don’t have to register an idle
routine or any of the usual callbacks, I don’t have to have a separate
function for every different kind of gui event, I can centralize my logic for
deciding when the screen needs refreshing, etc. The bottom line is, keeping
the main loop in my own program makes it shorter and gives it more accurate
control at the same time, so this seems fundamentally right, and conversely,
the traditional callback way of doing it seems fundamentally silly.

Glut provides some basic text rendering capability inside the OpenGL surface,
which is the only feature of glut I use at present. Really, this should be a
separate library, with a lot more flexibility and higher rendering quality

Glut’s basic polyhedra drawing is something you either just want to code
inline in your application, or you want way more capability, such as
constructive solid geometry, scene graph, etc. Basic polyhedra are only
useful for demos, and simple ones at that.

Glut’s window management is pretty basic, so is SDL’s. But SDL caters better
to the need to support both blitting and OpenGL drawing to the same surface
and will handle color depth mismatches for you, so SDL does quite a bit to
cut down on interface hassles.

Glut has filled an important niche in the past in that it gives you a way to
run the same OpenGL program just about everywhere, gives you enough of a gui
to set some options, enough text to communicate with the user, and that’s
about it. Enough for then, but not enough for today, plus its interfaces are
more verbose than necessary. So, a big thankyou to Mark Kilgard for
supplying this important component and making it easy to get started writing
OpenGL apps, but for me it’s a thing of the past.

I tried a little experiment on this FLTK+SDL demo:

http://www.turricane.org/~wizard/projects/fltk-demo/

I added the SDL_FULLSCREEN flag where it creates the SDL window. The result
is interesting: the application goes to fullscreen, displays the SDL window
briefly, then wham, it’s back in windowed mode as the FLTK window opens. OK,
I was asking for something impossible and at least it did not crash. Now,
what do I have to do to get the FLTK window to open up inside the fullscreen
SDL+OpenGL surface when the app is fullscreen, and outside when its not? I
believe I can do it, but it’s going to require some work. This is the real
test of whether I have the right widget set.

Regards,

DanielOn Tuesday 28 January 2003 11:04, Gib Bogle wrote:

I just installed FLTK on W2000. I built and tested the OpenGL samples,
and they look OK. But I have run into what appears to be a limitation.
Adding glutFullScreen() to a demo program makes it almost, but not
quite, full screen. The Windows toolbar is left on the screen, as is
the Office bar on the right edge. I can’t see how to display the OpenGL
scene on a bare screen, which I need. If you know how to do this,
please let me know. (Should we take this non-SDL discussion off the
list?).

I tried a little experiment on this FLTK+SDL demo:

http://www.turricane.org/~wizard/projects/fltk-demo/

I added the SDL_FULLSCREEN flag where it creates the SDL window. The result
is interesting: the application goes to fullscreen, displays the SDL window
briefly, then wham, it’s back in windowed mode as the FLTK window opens. OK,
I was asking for something impossible and at least it did not crash. Now,
what do I have to do to get the FLTK window to open up inside the fullscreen
SDL+OpenGL surface when the app is fullscreen, and outside when its not? I
believe I can do it, but it’s going to require some work.

Heheh, good luck.

-Sam Lantinga, Software Engineer, Blizzard Entertainment

Daniel Phillips wrote:

I added the SDL_FULLSCREEN flag where it creates the SDL window. The result
is interesting: the application goes to fullscreen, displays the SDL window
briefly, then wham, it’s back in windowed mode as the FLTK window opens. OK,
I was asking for something impossible and at least it did not crash. Now,
what do I have to do to get the FLTK window to open up inside the fullscreen
SDL+OpenGL surface when the app is fullscreen, and outside when its not? I
believe I can do it, but it’s going to require some work. This is the real
test of whether I have the right widget set.

Let us know how you get on.

Gib

Hmm, just looking back at my glut rant, I don’t really know what set me off
on that.

Anyway, it’s clear that only one of SDL or FLTK can be allowed to create the
window, the other one has to be taught to use the same window. I want SDL to
create the window, because it’s more likely to do the job correctly and in
accordance with the needs of my kind of rendering-centric app.

FLTK is pretty good about letting you override its widget’s drawing methods,
and FLTK 2 (now in CVS) is even better, cleaning up some parts of the 1.1 API
that were fully virtualizable (they needed that cleanup for the theming I
suppose). So I will start by substituting methods that just use generic
OpenGL commands, not doing any X drawing at all (or Win32 if this ever gets
to the porting stage).

Then, as long as the app is running fullscreen I have to make FLTK forget
everything it knows about X and supply virtual functions that treat SDL as
the underlying presentation interface. Since OpenGL will do all the drawing
and FL_Window is designed to be subclassed, this should work out OK. Another
way of putting this is, in fullscreen mode there’s no window manager - your
app is it, and it has to supply the missing window manager services to the
widget set. Fortunately, the widgets need only a tiny subset of typical
window manager services.

Next, the potentially messy event handling.

FLTK and SDL have their own, separate enumerations for, e.g, keyboard values.
These can be handled by a translation table, but… if FLTK does turn out to
play well with SDL, I’d go on to encourage Sam and Bill (Spitzak) to get
together and agree on common enumerations. FLTK expresses CTRL-o as FL_CTRL

  • ‘o’ whereas in SDL you’d write SDLK_o and explicitly check the control
    shift state. FLTK’s method makes more sense to me, but actually, it would be
    possible for SDL to adopt the same strategy while keeping the existing
    enumeration of unshifted text keys. It’s convenient that FLTK version 2
    hasn’t reached binary compatibility freeze yet.

All of this needs to be qualified with “I haven’t tried it yet”, and I’m not
even 100% sure I should be trying to push SDL’s envelope in this particular
way. It is, after all, already a decent platform for a single-window game,
which covers 99% of games. Then there’s the issue of marrying a C++ library
with SDL. Would it be worth the effort to seek an end-to-end C solution, so
that you aren’t forced to bring everything over to C++ just to have widgets?
A vanilla C solution would take away a lot of C++'s syntactic sugar, but it
would end up even smaller and faster than FLTK is now. We are talking
rewriting maybe 30,000 lines of code, not a weekend project.

For the time being I’ll keep trying to forcibly mate FLTK and SDL and see if
it produces offspring. With FLTK I can already satisfy my immediate need,
which is to have a nice set of controls in a separate window for an editor or
demo, but in fullscreen mode I have to make that window disappear and blast
out of fullscreen mode if it needs to reappear. That’s not the end of the
world but it’s not a complete solution either.

Regards,

DanielOn Tuesday 28 January 2003 23:31, Gib Bogle wrote:

…Now, what do I have to do to get the FLTK window to open
up inside the fullscreen SDL+OpenGL surface when the app is fullscreen,
and outside when its not? I believe I can do it, but it’s going to
require some work. This is the real test of whether I have the right
widget set.

Let us know how you get on.

Daniel Phillips wrote:

It may be a small thing, but I don’t like having the widget set run my event
dispatch loop for me. My application is not widget-centric, it is rendering
and realtime response-centric, so I want to run the main loop myself thanks.
FLTK lets me do this, glut does not.

You can use LibUFO. It gives you full control over your event loop.
So far, it works with SDL and GLUT, other backends might follow.

The only problem is that it is far away from binary compatibility.

cu,
Johannes

Thanks for that, ufo is an interesting project. Unfortunately, when I built
it, all the tests segfault, and after sniffing around a little with gdb I
decided I was likely in c++ binary compatibility hell and do not have more
time to investigate. Well, in case anyone recognizes this one instantly,
here’s the symptom:

UBasicButtonBorder::paintBorder (this=Cannot access memory at address
0x3c23d712) at ui/basic/ubasicborderfactory.cpp:145

After doing a little research, I found that GTK also lets me take control of
the main loop if I want to:

http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html

I’ll probably find the same about QT if I go digging. So it seems it’s
common for GUI frameworks to cater to my particular prejudice, where I do not
necessarily trust the main loop of a GUI to schedule things the way I want
them.

Anyway, UFO’s stated intent is bang-on what I’m looking for:

libUFO is a cross-platform high level GUI library for OpenGL.
It is based upon an abstract layer which must be implemented by a native
backend.

But it doesn’t seem quite ready to use, and I wonder why the library needs a
megabyte of program text to do this.

Regards,

DanielOn Wednesday 29 January 2003 18:11, Johannes Schmidt wrote:

Daniel Phillips wrote:

It may be a small thing, but I don’t like having the widget set run my
event dispatch loop for me. My application is not widget-centric, it is
rendering and realtime response-centric, so I want to run the main loop
myself thanks. FLTK lets me do this, glut does not.

You can use LibUFO. It gives you full control over your event loop.
So far, it works with SDL and GLUT, other backends might follow.

The only problem is that it is far away from binary compatibility.

Hi Daniel,

You can use LibUFO. It gives you full control over your event loop.
So far, it works with SDL and GLUT, other backends might follow.

The only problem is that it is far away from binary compatibility.

Thanks for that, ufo is an interesting project. Unfortunately, when I built
it, all the tests segfault, and after sniffing around a little with gdb I
decided I was likely in c++ binary compatibility hell and do not have more
time to investigate. Well, in case anyone recognizes this one instantly,
here’s the symptom:

UBasicButtonBorder::paintBorder (this=Cannot access memory at address
0x3c23d712) at ui/basic/ubasicborderfactory.cpp:145

Oh, well, perhaps I should have mentioned that I wrote that library :slight_smile:

I would appreciate if you send me your system specs so that I can dig into that problem.

But it doesn’t seem quite ready to use, and I wonder why the library needs a
megabyte of program text to do this.

Hmm, I suppose that one half consists of LGPL License statements.

I am rewriting some parts of the library and much deprecated code will be removed.
Unfortunately, I didn’t have much time last few months (at the moment, my studies are quite time consuming).

Regards,
JohannesOn Wednesday 29 January 2003 21:21, Daniel Phillips wrote:

On Wednesday 29 January 2003 18:11, Johannes Schmidt wrote:

But it doesn’t seem quite ready to use, and I wonder why the library
needs a
megabyte of program text to do this.

Looks like there is a SDL backend -
http://libufo.sourceforge.net/projects/usdl/---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 26/01/03


The information transmitted is for the use of the intended recipient only
and may contain confidential and/or legally privileged material. Any
review, re-transmission, disclosure, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited and may result in
severe penalties. If you have received this e-mail in error please notify
the Security Adviser of the Department of Communications, Information
Technology and the Arts, telephone (02) 6271-1880 and delete all copies of
this transmission together with any attachments.