Multiple windows; text editors

Hi,

we are coming up to speed with both Direct3d and OpenGL, and for
hopefully obvious reasons I have a couple basic questions to ask
about SDL.

  1. My application sometimes has to open numerous windows (well over a
    hundred in our “widowmaker” test cases) with graphics in each. Is
    there a demo or test case app for Windows, say, that demonstrates how
    SDL handles this kind of thing? Or, for that matter, any released
    application?

  2. One of the things we would like to find is a text editor ala
    RichEdit or WASTE (which we use as a control) that is cross platform
    and integrates reasonably well with the graphic content. Anything out
    there? We currently just use whatever editor code is available
    locally. We plan to overlay editors over the graphics.

Our overall graphics requirements are very simple, just nominal 2D
textures and line draws. There are fancier requirements in specific
instances that we’re treating as a separate problem.

Tnx,

-Mike

  1. My application sometimes has to open numerous windows (well over
    a hundred in our “widowmaker” test cases) with graphics in each. Is
    there a demo or test case app for Windows, say, that demonstrates
    how SDL handles this kind of thing? Or, for that matter, any
    released application?

Can SDL (using OpenGL/Direct3d) handle two? A few?

No, but you might get away with spawning one process for each window.

The problem is communication (IPC), the need for one process per
window (overhead, and potentially scheduling timing issues on some
platforms), and some desktop environments assuming that one
application means exactly one process.

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

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Tuesday 06 December 2005 21.02, Michael Brian Bentley wrote:

  1. My application sometimes has to open numerous windows (well over
    a hundred in our “widowmaker” test cases) with graphics in each. Is
    there a demo or test case app for Windows, say, that demonstrates
    how SDL handles this kind of thing? Or, for that matter, any
    released application?

Can SDL (using OpenGL/Direct3d) handle two? A few?

  1. My application sometimes has to open numerous windows (well over
    a hundred in our “widowmaker” test cases) with graphics in each. Is
    there a demo or test case app for Windows, say, that demonstrates
    how SDL handles this kind of thing? Or, for that matter, any
    released application?

Can SDL (using OpenGL/Direct3d) handle two? A few?

It seems clear that Mac OS X, through the compositing capabilities of
Quartz Extreme, can handle as many windows as I can create. My
questions are, how many of my kind of windows, very lightweight, can
an OpenGL app maintain, and if SDL introduces any performance issues.

This is (now) clearly the wrong venue for asking the first question,
but I’m thinking that the answer to the second question is probably
no, because most of the work is being done by the graphics hardware
anyway.

I have to go ask the same question for X11 and OpenGL on Linux, and
DirectX on Windows. I expect that the answers won’t be as clear cut
because I’m not sure what Windows provides for compositing (I
understand that Vista is supposed to have something, to the detriment
of OpenGL); and I am not aware of anything of the sort for Linux.

Thanks for putting up with these questions as I think 'em through aloud…

-Mike

Like so? http://www.kde-look.org/content/show.php?content=25281

:)On Tue, Dec 06, 2005 at 01:39:48PM -0800, Michael Brian Bentley wrote:

I have to go ask the same question for X11 and OpenGL on Linux, and
DirectX on Windows. I expect that the answers won’t be as clear cut
because I’m not sure what Windows provides for compositing (I
understand that Vista is supposed to have something, to the detriment
of OpenGL); and I am not aware of anything of the sort for Linux.


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

so? http://www.kde-look.org/content/show.php?content=25281

:slight_smile:


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

Yeah, I think so maybe? Is that an SDL-ish thing or an example of KDE
filling the bill? It looks like the latter, thanks for pointing it
out.

Can SDL (using OpenGL/Direct3d) handle two (windows)? A few?

No, but you might get away with spawning one process for each window.

The problem is communication (IPC), the need for one process per
window (overhead, and potentially scheduling timing issues on some
platforms), and some desktop environments assuming that one
application means exactly one process.

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

To clarify, is the process-per-window constraint an issue with SDL or
is it with either Direct3d or OpenGL?

(A while ago, I did do a couple test apps on two platforms using
OpenGL and got very good results, without needing to assign a process
to each window.)

One way or the other, I’m glad I asked.

Can SDL (using OpenGL/Direct3d) handle two (windows)? A few?

No, but you might get away with spawning one process for each
window.

The problem is communication (IPC), the need for one process per
window (overhead, and potentially scheduling timing issues on some
platforms), and some desktop environments assuming that one
application means exactly one process.

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

To clarify, is the process-per-window constraint an issue with SDL
or is it with either Direct3d or OpenGL?

It’s an SDL 1.x design issue.

There are patches that allow some backends to handle multiple windows,
but I’m not sure if there is a solution that supports OpenGL.

(A while ago, I did do a couple test apps on two platforms using
OpenGL and got very good results, without needing to assign a
process to each window.)

Most OpenGL implementations can handle multiple contexts just fine, so
no major problem there. (Some broken drivers, and there might be some
platforms that don’t support it at all, but other than that…)

I don’t know about Direct3D. It was originally designed for games,
whereas OpenGL comes from the high end graphics world, but I’d still
be a bit surprized if recent versions of Direct3D support only one
window per process.

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

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 07 December 2005 08.01, Michael Brian Bentley wrote:

David Olofson wrote:

Most OpenGL implementations can handle multiple contexts just fine, so
no major problem there. (Some broken drivers, and there might be some
platforms that don’t support it at all, but other than that…)

Hi,
correct me if I am wrong, but from what I have experienced, there IS actually a problem running OpenGL on Linux with
Xinerama (XFree/X.org Matrox mga driver – driver from Matrox.com also doesn’t working). There is no hardware
acceleration for multiple screens, though.
It looks like OpenGL tries to get a dedicated graphic context and fails at it.–
Alexander Ellwein

Well, last time I used Xinerama, it completely ruled out accelerated
OpenGL, IIRC.

As to Matrox, their drivers seem to have problems with multiple
contexts on all platforms. I had to give up on my old G400 MAX
because of this, as Matrox refused or were unable to solve this (long
since known) problem.

And now that I've finally retired my F980, I no longer need Matrox RAMDACs. Indeed, cards with dual-link DVI are hard to find and/or insanely overpriced, but at least they exist *now*, and there are solid Linux drivers for some of them. So, for the first time, I actually have a serious display *and* a video card that can drive it properly - and I didn't have to wait for one to become obsolete before the other was released! :-D The high end display market has finally become slightly less of an expensive joke, it seems.

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

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 07 December 2005 14.48, Alexander Ellwein wrote:

David Olofson wrote:

Most OpenGL implementations can handle multiple contexts just
fine, so no major problem there. (Some broken drivers, and there
might be some platforms that don’t support it at all, but other
than that…)

Hi,
correct me if I am wrong, but from what I have experienced, there IS
actually a problem running OpenGL on Linux with
Xinerama (XFree/X.org Matrox mga driver – driver from Matrox.com
also doesn’t working). There is no hardware
acceleration for multiple screens, though.
It looks like OpenGL tries to get a dedicated graphic context and
fails at it.

He was talking about multiple contexts, not screens. A context is a
given area with a distinct GL state, normally occuping one window.

And FYI nvidia’s drivers do support OpenGL on multiple screens.

  • SROn 12/7/05, Alexander Ellwein wrote:

David Olofson wrote:

Most OpenGL implementations can handle multiple contexts just fine, so
no major problem there. (Some broken drivers, and there might be some
platforms that don’t support it at all, but other than that…)

Hi,
correct me if I am wrong, but from what I have experienced, there IS actually a problem running OpenGL on Linux with
Xinerama (XFree/X.org Matrox mga driver – driver from Matrox.com also doesn’t working). There is no hardware
acceleration for multiple screens, though.
It looks like OpenGL tries to get a dedicated graphic context and fails at it.

KDE’s kcompmgr, utilizing composite support in recent X server releases,
no doubt on accelerated hardware (otherwise you’re just murdering CPU cycles
for crap like transparency and drop shadows!)

-bill!On Tue, Dec 06, 2005 at 10:47:49PM -0800, Michael Brian Bentley wrote:

Yeah, I think so maybe? Is that an SDL-ish thing or an example of KDE
filling the bill? It looks like the latter, thanks for pointing it
out.