gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL and MS Windows : done


From: Xavier Glattard
Subject: Re: OpenGL and MS Windows : done
Date: Thu, 1 Feb 2007 08:29:35 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Richard Frith-Macdonald <richard <at> tiptree.demon.co.uk> writes:

> On 30 Jan 2007, at 18:01, xavier.glattard <at> free.fr wrote:
> 
> >
> > Hi all
> >
> > Here is a patch to GS backend.
> >
> > http://amstradstuff.free.fr/GNUstep/back-Win32GL-070130.patch.gz
> > http://amstradstuff.free.fr/GNUstep/back-Win32GL-070130.new.tar.gz
> >
> > You can now use NSOpenGLView under MS Windows
> >
> > It's based upon the X11 code, it doesnt do more (actually less!)  
> > and has not
> > been fully tested, but it works with my Gears toy
> > (http://amstradstuff.free.fr/GNUstep/gnustep-gears-1.0.tar.gz)
> 
> Thanks very much.  I applied your patch.

It still needs some work. More to come :-)

> > If you have time, you might help me to answer some questions about the
> > differences between Gears under X11 ans Gears under Windows.  
> > Probably some
> > RunLoop and event management issues that i'd be pleased to get solved.
> > (you might need a linux box and a windows box...)
> 
> I can try ... but most likely we would need some really tiny sample  
> program to demonstrate any oddities, so we could run under debug.

Gears is quite tiny. Build it, run it and try as many configurations you want
with the gui. Under Windows you might have to change LDFLAGS in the make file so
it can find OpenGL libraries.

Then you should read some parts of the file GearsAnimator.m (you can ignore the
other files). It defines 5 small *Animator classes that use either events,
performers or timers to run the animation loop. Each class basically uses its
own [-_animation{Begin,Loop,End}] methods and some other utility methods that
send/receive events, start/stop timers, send/receive perfomers.

              /-- TimerBasedAnimator
              |
  Animator <--|-- PerformerBasedAnimator
 (abstract)   |                         /-- EventAndPerformerBasedAnimator
              \-- EventBasedAnimator <--|
                                        \-- EventAndTimerBasedAnimator

The TimerbasedAnimator class uses 3 class methods needed to manage 2 or more
timer based animation loops (using Notifications). They can be ignored.

When an EventBasedAnimator is running the NSApplication loop can't handle
timers, performers and autodisplay because events are always handled first
(under X11). The EventAnd*BasedAnimator classes are hacks : they have been
written to give time to the NSApplication loop to perform other task every 1/4
second.

IMHO this tool might help you gnustep developpers to explore and understand the
NSApplication loop on various platforms.

Thank for your help

Xavier







reply via email to

[Prev in Thread] Current Thread [Next in Thread]