Derived from | |
Framework | ApplicationServices/ApplicationServices.h |
Companion guide | |
Declared in | CGGLContext.h |
The CGGLContext header file defines functions that create and update a graphics context for OpenGL drawing. A CGGLContext context is a type of CGContextRef
that is used for OpenGL content. However, its use is not recommended.
Creates a Quartz graphics context from an OpenGL context.
CGContextRef CGGLContextCreate ( void *glContext, CGSize size, CGColorSpaceRef colorspace );
The context that the OpenGL system uses to manage OpenGL drawing.
The dimensions of the OpenGL viewport rectangle.
An RGB color space that serves as the destination space when rendering device-independent colors. If NULL
, Quartz uses the default RGB color space. Quartz retains the color space you pass in; on return, you may safely release it.
A new Quartz graphics context. You are responsible for releasing this object by calling CGContextRelease
.
The use of this function is not recommended.
Creates a Quartz context from the OpenGL context glContext
. The context establishes an OpenGL viewport rectangle with dimensions specified by the size
parameter by calling glViewport(3G)
. If non-NULL
, the colorspace
parameter should be an RGB profile that specifies the destination space when rendering device-independent colors.
CGGLContext.h
Updates the size of the viewport associated with an OpenGL context.
void CGGLContextUpdateViewportSize ( CGContextRef c, CGSize size );
A Quartz graphics context obtained by calling CGGLContextCreate
.
The new dimensions of the OpenGL viewport.
The use of this function is not recommended.
You should call this function whenever the size of the associated OpenGL context changes.
CGGLContext.h
© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-12-22)