I'm trying to use the example in /Developer/Examples/OpenGL/Cocoa/CocoaGL to draw a single pixel inside the MyOpenGLView. Does anyone have any experience trying to do this? I've simplified the drawRect function to:
I added these two lines...I though they'd draw a pixel:
Any suggestions? I'd really appreciate it...
-Dogcow "moof!"
- (void) drawRect: (NSRect) rect
{
glViewport(0, 0, (GLsizei) rect.size.width, (GLsizei) rect.size.height);
NSLog(@"Width: %f, Height: %f", rect.size.width, rect.size.height);
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT+GL_DEPTH_BUFFER_BIT+GL_STENCIL_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glVertex2f(50,50);
[[self openGLContext] flushBuffer];
}
I added these two lines...I though they'd draw a pixel:
glColor3f(1.0,1.0,1.0);
glVertex2f(50,50);
Any suggestions? I'd really appreciate it...
-Dogcow "moof!"