I have been using this standard code for single buffered project in Cocoa.
-(void)drawRectNSRect)rect
{
glClearColor( 0, 0, 0, 0 ) ;
glClear( GL_COLOR_BUFFER_BIT ) ;
glColor3f( 0.0f, 1.0f, 0.0f ) ;
glBegin( GL_TRIANGLES) ;
{
glVertex3f( ver1x, ver1y, 0.0 ) ;
glVertex3f( ver2x, ver2y, 0.0 ) ;
glVertex3f( ver3x , ver3y, 0.0 ) ;
}
glEnd() ;
glFlush();
-----
My question is how does this get modified in the case of a double buffered opengl program. Also is the call to drawRect ie [self setNeedsDisplay: YES] changed or does it remain the same..
Thanks in Advance,
Vyom
-(void)drawRectNSRect)rect
{
glClearColor( 0, 0, 0, 0 ) ;
glClear( GL_COLOR_BUFFER_BIT ) ;
glColor3f( 0.0f, 1.0f, 0.0f ) ;
glBegin( GL_TRIANGLES) ;
{
glVertex3f( ver1x, ver1y, 0.0 ) ;
glVertex3f( ver2x, ver2y, 0.0 ) ;
glVertex3f( ver3x , ver3y, 0.0 ) ;
}
glEnd() ;
glFlush();
-----
My question is how does this get modified in the case of a double buffered opengl program. Also is the call to drawRect ie [self setNeedsDisplay: YES] changed or does it remain the same..
Thanks in Advance,
Vyom