In IB I placed an NSOpenGLView instance into the window.
I have all of my drawing code inside a custom NSViewController like so:
// MyOpenGLViewController.h
@interface MyOpenGLViewController : NSViewController
{
IBOutlet NSOpenGLView *glView;
}
// MyOpenGLViewController.m
-(void)awakeFromNib
{
[self drawFrame];
}
-(void)drawFrame
{
[[glView openGLContext] makeCurrentContext];
glClearColor(0, 0, 0, 1);
}
Everything is linked up and "drawFrame" gets called but I don't get anything on the screen. It's always white. What should I be checking for?