OpenGL view first frame flickers garbage

In my OpenGL game, the view always shows random garbage immediately upon launching and then starts rendering. How can I prevent this? The view is created in the nib, would it fix this if I did it programmatically? I'm using a custom NSView, not NSOpenGLView.

One of the window settings in Interface Builder is "visible when loaded" or something like that. You can uncheck that and then display the window when it's ready. Clearing the framebuffer when you first create it might be easier, but not as nice presentation wise.