help-gnustep
[Top][All Lists]
Advanced

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

NSOpenGL testing


From: xavier . glattard
Subject: NSOpenGL testing
Date: Tue, 23 Jan 2007 16:45:45 +0100
User-agent: Internet Messaging Program (IMP) 3.2.5

Hello

I've just written a small tools for testing and learning the use of
NSOpenGLView. It's based upon the famous glxgears and its name is Gears.
You can get it there :
http://amstradstuff.free.fr/GNUstep/gnustep-gears-1.0.tar.gz

Gears is a useless tiny tool written as a learning project
to help myself understand GNUstep.
Nevertheless it may be use as a test tool or for benchmarking.
The code might also be interesting for other newbies, as I did
not use Gorm : all is hand coded because i wanted to understand
what happens is a GNUstep application. I will never do it again :)

You might compare the results with those get with glxgears.
(the OpenGL drawing code is the same)

Three parameters are used :

 - the backing store type of the window :
   - buffered / retained
   - non retained
   (NB: the OpenGL view is always 'non retained')

 - immediat display or 'autodisplay'
   when 'autodisplay' is used a 'display' method does not always
   results in drawing the view on the screen : the drawing is defered
   and so some frames are lost (computed but not drawn).

 - the way the animation loop is done :
   - a periodic timer:
     the only loop that runs with any backing store type
     and the fastest (with non retained backing type)
   - a low priority performer:
     the fastest with buffered and retained backing type
     do not work with non retained backing type (*)
   - an event:
     does not work with autodisplay
     three versions:
     - event only: timers and performers can not be executed
       (you must stop the animation to display stats)
     - event and periodic performer (every 0.25 sec - hardcoded) (*)
     - event and periodic timer (every 0.25 sec - hardcoded) (*)

Note : (*) Some animation loop method do not work with non retained
backing type : the XPendingEvent call seems to be blocking (it should
not) and then application events and performers are not treated by
the NSRunLoop until an event comes from the X server (mouse move,
periodic flush ?).

ToDo/bugs:
- the GL view in a buffered/retained window is not displayed at
  the window creation, because the iew is then considered as
  retained. The windowDidExpose notification seems not be send
  and then display can not be handle manualy
- InfoPanel might display some interesting OpenGL informations.
- ....

Any comment will be welcome :-)

Xavier





reply via email to

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