Re: slow OpenGl or RunLoop misunderstanding ?

[email protected]
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
Selon Richard Frith-Macdonald <[email protected]>:

>
> On 15 Jan 2007, at 20:25, [email protected] wrote:
>
> >
> >   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
> >   [_scene glDrawFrame];
> >
> >   [[self openGLContext] flushBuffer];
> > }
> >
> > I've tried to comment out the 3 last lines :
> > - when all 3 lines disabled I get 3040 FPS ! (yes, 3 thousands)
> > - when i left any of the lines I get 380-480 FPS... (4 hundreds)
> >
> > It looks like my opengl is so slow... (not accelerated ? why ?!)
>
> I agree that it looks like there may be a hardware acceleration
> problem.  Perhaps you could try hacking initWithFormat:sharedContext:
> to see if changing any of the context initialisation will effect
> things (when googling this I saw a comment somewhere about direct
> rendering disabling acceleration on some system).
>
> > and RunLoop has no responsability (no "wait state").
> >
> > Xavier
> >

Finally you were right in your first answer : RunLoop delays
the  'needDisplay event' (every 1/500 sec ?) :
when i change my loop to a timed one (NSTimer...) _and_ use
[-lockFocusInRect:}/[-drawRect:]/[-unlockFocus] instead of
[-setNeedsDisplay:] i get more than 2000 FPS :-)

As I think the timer way is nothing but a workaround
I'm going to look for a way to change that... :o)

Xavier
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.