On 2006-11-08 15:26:35 +0200 Renaud Molla <renaud.molla@wanadoo.fr>
wrote:
Enrico:
What do you mean by [[self openGLContext] flushBuffer] does the
trick?
I mean that an implementation of -drawRect: like this:
- (void)drawRect:(NSRect)rect
{
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0f, 0.85f, 0.35f);
glBegin(GL_TRIANGLES);
glVertex3f(0.0, 0.6, 0.0);
glVertex3f(-0.2, -0.3, 0.0);
glVertex3f(0.2, -0.3 ,0.0);
glEnd();
glFlush();
/* add this line */
[[self openGLContext] flushBuffer];
}
will work without the need of a timer.