NSOpenGLView is an NSView subclass that has an OpenGL drawing context. Just as you needed the focus locked on a view to do drawing with Quartz, so the OpenGL drawing context must be active for any OpenGL drawing commands to have an effect.
Here are some important methods in NSOpenGLView:
- (id)initWithFrame:(NSRect)frameRect pixelFormat:(NSOpenGLPixelFormat *)formatThe designated initializer.
- (NSOpenGLContext*)openGLContextReturns the view's OpenGL context.
- (void)reshapeCalled when the view is resized. The OpenGL context is active when this method is called.
- (void)drawRect:(NSRect)rCalled when the view needs to be redrawn. The OpenGL context is active when this method is called.