Okay, guys, sorry, but this is getting obnoxious. I've been programming C++ forever it seems, but I can't get this NSOpenGLView to work. I'm sure I'm just missing a simple step (like swapping buffers or adding the wrong framework). So I'll guide you all through what I do, and you can tell me what is wrong (I hope)
New project (call it "Test").
Open Interface Builder
In the window add an NSOpenGLView
In classes, subclass NSOpenGLView -- call it TestView
Instantiate TestView
Info panel GLView and make it a TestView
Create files for TestView
(back to Project Builder)
In TestView.h add the line:
- (void) drawRect

NSRect)rect;
In TestView.m add:
#include <gl/gl.h> // Also add OpenGL Framework
- (void) drawRect

NSRect)rect {
NSBeep(); // Test if reached
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glBegin(GL_QUADS);
glVertex3f(-0.5,-0.5,-1.0);
glVertex3f(0.5,-0.5,-1.0);
glVertex3f(0.5,0.5,-1.0);
glVertex3f(-0.5,0.5,-1.0);
glEnd();
}
At the end of the function I think I have tried everything I can think of from trying GLUT framework swapping buffers with GLUT to [[self openGLContext] flushBuffer] and nothing will appear.
The beep occurs -- just no rendering.
Thanks for any assistance here!
Jeff