SDL and multiwindow project

Hello,
I’m working on multiwindowing in SDL. At this moment I implement a
simple trick: I’ve changed location some global variables and put them
into struct and then I’ve created array such structs. It seems to be
working, but… there are 2 ends of stick: on one hand I have API
without many changes (at the moment I add only one function to public
interface), on the other hand this is problematic if you want use SDL in
multithreaded application, because this function works like switch
which change instance of variables. It works , but I think about
future of SDL… I want to know if someone had needed to use
multiwindowing with SDL before (I read mailing list archives), and what
developers think about it, because I think that if we want to do it fine
we have to change public API… It is problematic for peoples who use
SDL in their applications, and changes only libs… Maybe there are any
plans to start new version of SDL (f.g. 1.4.x)??? What do you think
about multiwindowing in SDL ???

Sorry about my English :wink:
Martin Kardigen

when i run my engine normally (native, c++) i can see the mouse over the
window.

how ever when i run my engine through c#, the mouse disapears when it goes
over the window.

any ideas on how i can try to work out whats going on?

where abouts in the sdl 1.2 code i should look to dive in to the problem._________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.com/

Hello,
I’m working on multiwindowing in SDL. At this moment I implement a
simple trick: I’ve changed location some global variables and put them
into struct and then I’ve created array such structs. It seems to be
working, but… there are 2 ends of stick: on one hand I have API
without many changes (at the moment I add only one function to public
interface), on the other hand this is problematic if you want use SDL in
multithreaded application, because this function works like switch
which change instance of variables. It works , but I think about
future of SDL… I want to know if someone had needed to use
multiwindowing with SDL before (I read mailing list archives), and what
developers think about it, because I think that if we want to do it fine
we have to change public API… It is problematic for peoples who use
SDL in their applications, and changes only libs… Maybe there are any
plans to start new version of SDL (f.g. 1.4.x)??? What do you think
about multiwindowing in SDL ???

The proposed API was posted to the list a few weeks ago. You should go
read that discussion under the title “Suggestions needed on multiwindow
implementation for SDL”. The problem with multithreading was discussed
at that time.

The trick you describe is pretty much the only way to add multiple
windows to SDL without changing the complete API. As it is, the need to
change the event record to contain a window ID changes the ABI so that a
multiwindow version of SDL can not be binary compatible with any older
version of SDL. We are hoping to see multiple windows in SDL 2.0.

The only other approach is to add the window ID to every SDL function
that depends on a window. That would be a dramatic change to the API and
would require rewriting a huge portion of SDL. The current SDL code is
not really thread safe and making it thread safe would be difficult.
Anyway, there are operating systems (it seems Windows is one) that don’t
allow multiple threads to do graphics. At least that is what I have been
told.

	Bob PendletonOn Wed, 2005-09-21 at 09:03 +0200, Marcin Kawelski wrote:

Sorry about my English :wink:
Martin Kardigen


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


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

oops…

You also need to look at the “Any News About…?” thread from about 2
weeks ago.

	Bob PendletonOn Wed, 2005-09-21 at 09:03 +0200, Marcin Kawelski wrote:

Hello,
I’m working on multiwindowing in SDL. At this moment I implement a
simple trick: I’ve changed location some global variables and put them
into struct and then I’ve created array such structs. It seems to be
working, but… there are 2 ends of stick: on one hand I have API
without many changes (at the moment I add only one function to public
interface), on the other hand this is problematic if you want use SDL in
multithreaded application, because this function works like switch
which change instance of variables. It works , but I think about
future of SDL… I want to know if someone had needed to use
multiwindowing with SDL before (I read mailing list archives), and what
developers think about it, because I think that if we want to do it fine
we have to change public API… It is problematic for peoples who use
SDL in their applications, and changes only libs… Maybe there are any
plans to start new version of SDL (f.g. 1.4.x)??? What do you think
about multiwindowing in SDL ???

Sorry about my English :wink:
Martin Kardigen


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


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