O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSOpenGLView — Mac OS X 10.0

Synopsis

This subclass of NSView allows applications to render calls to the OpenGL API into a Cocoa view hierarchy. Instances of this class maintain NSOpenGLPixelFormat and NSOpenGLContext objects to control many OpenGL rendering options and parameters.

image with no caption

@interface NSOpenGLView : NSView
                                  // Initializers
   - (id)initWithFrame:(NSRect)frameRect 
                                 pixelFormat:(NSOpenGLPixelFormat*)format;
                                  // Accessor Methods
   - (void)setPixelFormat:(NSOpenGLPixelFormat*)pixelFormat;
   - (NSOpenGLPixelFormat*)pixelFormat;
   - (void)setOpenGLContext:(NSOpenGLContext*)context;
   - (NSOpenGLContext*)openGLContext;
                                  // Class Methods
   + (NSOpenGLPixelFormat*)defaultPixelFormat;
                                  // Instance Methods
   - (void)clearGLContext;
   - (void)reshape;
   - (void)update;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required