| Framework | AGL/agl.h |
| Companion guide | |
| Declared in | agl.h aglRenderers.h |
The AGL (Apple Graphics Library) API is part of the Apple implementation of OpenGL in Mac OS X. AGL contains the windowing system–specific implementation of OpenGL functions and commands for Carbon. Using AGL functions, you can create and destroy AGL rendering contexts, select OpenGL renderers, swap buffers, and perform operations on drawable objects (windows, pixel buffers, offscreen memory, and full-screen graphics devices).
To use AGL from the Carbon framework, your application must link to both the AGL and the OpenGL (OpenGL/OpenGL.h) frameworks.
aglCreatePixelFormat
aglChoosePixelFormat
aglDescribePixelFormat
aglDestroyPixelFormat
aglGetCGLPixelFormat
aglDisplaysOfPixelFormat
aglNextPixelFormat
aglDevicesOfPixelFormat Deprecated in Mac OS X v10.5
aglCreateContext
aglCopyContext
aglDestroyContext
aglGetCGLContext
aglGetCurrentContext
aglSetCurrentContext
aglSwapBuffers
aglUpdateContext
aglSetFullScreen
aglSetOffScreen
aglGetDrawable Deprecated in Mac OS X v10.5
aglSetDrawable Deprecated in Mac OS X v10.5
aglCreatePBuffer
aglDestroyPBuffer
aglDescribePBuffer
aglGetPBuffer
aglSetPBuffer
aglTexImagePBuffer
aglSurfaceTexture Deprecated in Mac OS X v10.5
aglDescribeRenderer
aglDestroyRendererInfo
aglNextRendererInfo
aglQueryRendererInfoForCGDirectDisplayIDs
aglQueryRendererInfo Deprecated in Mac OS X v10.5
aglUseFont Deprecated in Mac OS X v10.5
Creates a pixel format object that satisfies the constraints of the specified buffer and renderer attributes.
AGLPixelFormat aglChoosePixelFormat ( const void *gdevs, GLint ndev, const GLint *attribs );
A pointer to an AGLDevice data type that contains an array of Mac OS graphics devices. AGL chooses pixel formats and renderers that are appropriate for these devices. To create a pixel format object that supports all devices on the system, pass NULL.
The number of graphics devices that your application supplies in the gdevs parameter. Pass 0 if you also pass NULL for the gdevs parameter.
A NULL terminated array that contains a list of buffer and renderer attributes. Attributes can be Boolean or integer. If an attribute is integer, you must supply the desired value immediately following the attribute. If the attribute is Boolean, do not supply a value because its presence in the attributes array implies a true value. For information on the attributes that you can supply, see “Buffer and Renderer Attributes,” “Renderer Attributes”, and the Discussion below.
A new pixel format object that contains pixel format information and a list of virtual screens. Returns NULL if the system cannot find a pixel format and virtual screen that satisfies the constraints of the buffer and renderer attributes.
After a pixel format object is created successfully, the integer attributes are set to values that are as close to the desired value as can be provided by the system. Attribute values can differ for each virtual screen. You can use the AGL_MINIMUM_POLICY and AGL_MAXIMUM_POLICY attributes to control how the system chooses the setting. For more information on choosing attributes, see OpenGL Programming Guide for Mac OS X.
The Boolean attribute constants include the following. For complete descriptions, see “Buffer and Renderer Attributes” and “Renderer Attributes”.
The following are integer attribute constants and must be followed by a value. For complete descriptions, see “Buffer and Renderer Attributes” and “Renderer Attributes”.
agl.hSets the value of a global option.
GLboolean aglConfigure ( GLenum pname, GLuint param );
The name of the option whose value you want to set. See “Globally Configured Options” for a list of constants you can pass.
The value to set the option to.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
This function changes the values of options that affect the operation of OpenGL in all rendering contexts in the application, not just the current rendering context.
agl.hCopies the specified state variables from one rendering context to another.
GLboolean aglCopyContext ( AGLContext src, AGLContext dst, GLuint mask );
The source rendering context.
The destination rendering context.
A mask that specifies the state variables to copy. Pass a bit field that contains the bitwise OR of the state variable names that you want to copy. Use the symbolic mask constants that are passed to the OpenGL function glPushAttrib. To copy as many state variables as possible, supply the constant GL_ALL_ATTRIB_BITS. For a description of the symbolic mask constants, see OpenGL Reference Manual.
Returns GL_FALSE if the function fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
Not all OpenGL state values can be copied. For example, pixel pack and unpack state, render mode state, and select and feedback state are not copied. The state that can be copied is exactly the state that is manipulated by the OpenGL call glPushAttrib.
agl.hCreates an AGL rendering context.
AGLContext aglCreateContext ( AGLPixelFormat pix, AGLContext share );
A pixel format object creating by calling the function aglChoosePixelFormat.
The rendering context with which to share the OpenGL object state—including texture objects, programs and shader display lists, vertex array objects, vertex buffer objects, pixel buffer objects, and frame buffer objects—and the object state associated which each of these object types. Pass NULL to indicate that no sharing is to take place.
A new rendering context. The aglCreateContext function returns NULL if the function fails for any reason. You can call the function aglGetError to determine what the error is.
If the pixel format object you supply is able to support multiple graphics devices, then the rendering context can render transparently across the supported devices. With a multiple-device rendering context, sharing is possible only when the relationship between the renderers and the graphics devices they support is the same for all rendering contexts that are shared. Normally you achieve the best results by using the same pixel format object for all shared rendering contexts. For more information, see OpenGL Programming Guide for Mac OS X.
agl.hCreates a pixel buffer of the specified size, compatible with the specified texture target.
GLboolean aglCreatePBuffer ( GLint width, GLint height, GLenum target, GLenum internalFormat, GLint max_level, AGLPbuffer *pbuffer );
The width, in pixels, of the pixel buffer.
The height, in pixels, of the pixel buffer.
A constant that specifies the type of the pixel buffer target texture. You can supply any of the following texture targets:
GL_TEXTURE_2D, a texture whose dimensions are a power of two.
GL_TEXTURE_RECTANGLE_EXT, a texture whose dimensions are not a power of two.
GL_TEXTURE_CUBE_MAP, a mapped cube texture.
A constant that specifies the internal color format of the pixel buffer, which can be GL_RGB or GL_RGBA. The format controls whether the alpha channel of the pixel buffer is used for texturing operations.
The maximum level of mipmap detail allowable. Pass 0 for a pixel buffer that's not using mipmaps. The value passed should never exceed the actual maximum number of mipmap levels that can be represented with the given width and height.
On return, points to a new pixel buffer object.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
This function does not have any knowledge of OpenGL contexts or pixel format objects and does not specifically allocate the storage needed for the actual pixel buffer. These operations occur when you call the function aglSetPBuffer.
You can determine the dimensional limits of a pixel buffer by calling the OpenGL function glGetInteger. You can find the maximum size supported by querying GL_MAX_VIEWPORT_DIMS and the minimum size by querying GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, which returns two integer values (similar to GL_MAX_VIEWPORT_DIMS). All pixel buffer dimensions that you request with the function aglCreatePBuffer should fall within these limits (inclusively) and should comply with any limitations imposed by the texture target you select.
The maximum viewport size supported in Mac OS X is quite large. You should take into consideration the amount of video or system memory required to support the requested pixel buffer size, including additional memory needed for multiple buffers and options such as multisampling.
agl.hCreates a pixel format with the provided attributes.
AGLPixelFormat aglCreatePixelFormat ( const GLint *attribs );
The attributes for the pixel format.
A pixel format object.
agl.hRetrieves information that describes the specified pixel buffer object.
GLboolean aglDescribePBuffer ( AGLPbuffer pbuffer, GLint *width, GLint *height, GLenum *target, GLenum *internalFormat, GLint *max_level );
A pixel buffer object.
On return, points to the width, in pixels, of the pixel buffer.
On return, points to the height, in pixels, of the pixel buffer.
On return, points to a constant that specifies the pixel buffer target texture type, such as:
GL_TEXTURE_2D, a texture whose dimensions are a power of two.
GL_TEXTURE_RECTANGLE_EXT, a texture whose dimensions are not a power of two.
GL_TEXTURE_CUBE_MAP, a mapped cube texture.
On return, points to a constant that specifies the internal color format of the pixel buffer— either GL_RGB or GL_RGBA.
On return, points to the maximum level of mipmap detail or 0 if the pixel buffer doesn't use mipmaps.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
The width, height, texture target, and internal texture color format of a pixel buffer object are set at its creation and cannot be changed without destroying and then creating the object again. The level is set when the pixel buffer object is attached to a rendering context by calling the function aglSetPBuffer.
agl.hRetrieves the value of an attribute associated with a pixel format object.
GLboolean aglDescribePixelFormat ( AGLPixelFormat pix, GLint attrib, GLint *value );
The pixel format object to query.
The attribute whose value you want to obtain. For a list of possible attributes, see “Buffer and Renderer Attributes.”
On return, points to the value of the attribute.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
On multiscreen systems that support multiple renderers simultaneously, aglChoosePixelFormat can return a list of more than one pixel format object. To retrieve the data in pixel format objects other than the first one in the list, call aglNextPixelFormat. Then pass the returned pixel format object to aglDescribePixelFormat to retrieve an attribute value.
agl.hObtains the value associated with a renderer property.
GLboolean aglDescribeRenderer ( AGLRendererInfo rend, GLint prop, GLint *value );
An opaque renderer information object that contains a description of the renderer capabilities you want to inspect. You obtain a renderer information object by calling the function aglQueryRendererInfo.
The renderer property whose value you want to obtain. See “Renderer Properties” for a list of the constants you can supply for this parameter. There are also a number of constants described in “Buffer and Renderer Attributes” that you can supply to this function.
On return, points to the value of the requested property.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
agl.hFrees the resources associated with a rendering context.
GLboolean aglDestroyContext ( AGLContext ctx );
The rendering context whose resources you want to release.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
This function frees all the resources used by the rendering context passed to it. If the rendering context that you pass is the current rendering context, the current context is set to NULL and there is no current rendering context after the function executes.
After you call this function, you must make sure that you do not use the destroyed rendering context. This includes using AGL macros in which the rendering context is explicitly passed to OpenGL.
agl.hReleases the resources associated with a pixel buffer object.
GLboolean aglDestroyPBuffer ( AGLPbuffer pbuffer );
The pixel buffer object whose resources you want to release.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
Call this function only after you no longer need to use the pixel buffer object. Before calling this function, you should delete all texture objects associated with the pixel buffer object. You do not need to make sure that all texturing commands have completed prior to calling this function, because the OpenGL framework manages texturing synchronization.
agl.hFrees the memory associated with a pixel format object.
void aglDestroyPixelFormat ( AGLPixelFormat pix );
The pixel format object whose resources you want to release. This must be a pixel format object returned by the functionaglChoosePixelFormat. AGL sets a AGL_BAD_PIXELFMT error if you pass the returned value from the function aglNextPixelFormat or the pix parameter is not a valid pixel format.
A copy of the pixel format data is made by the aglCreateContext function, so your application can free a pixel format immediately after creating a rendering context with it. On the other hand, a pixel format object can be useful for enumerating virtual screens when multiple renderers are supported, so you may want to retain it.
agl.hFrees resources associated with a renderer information object.
void aglDestroyRendererInfo ( AGLRendererInfo rend );
The renderer information object whose resources you want to release.
AGL sets a AGL_BAD_RENDINFO error if you pass an invalid renderer information object. You can check for this error by calling aglGetError.
agl.hDisables an option for a rendering context.
GLboolean aglDisable ( AGLContext ctx, GLenum pname );
A rendering context.
The capability that you want to disable. You can pass any of the constants listed in “Context Options and Parameters” that specify they can be enabled or disabled.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
agl.hReturns the graphics devices supported by a pixel format object.
CGDirectDisplayID * aglDisplaysOfPixelFormat ( AGLPixelFormat pix, GLint *ndevs );
A pixel format object.
On return, points to the number of devices in the list returned by the function.
An array of display IDs or or NULL if the function fails for any reason. If an error occurs, call the function aglGetError to determine what the error is.
You typically use this function after you call the function aglChoosePixelFormat, which can return a list of more than one pixel format object. The first pixel format object in the list is guaranteed to support all of the graphics devices requested of that function. You call aglDisplaysOfPixelFormat to find out which graphics devices are supported by other pixel format objects in the list.
agl.hEnables an option for a rendering context.
GLboolean aglEnable ( AGLContext ctx, GLenum pname );
A rendering context.
The option you want to enable. You can pass any of the constants listed in “Context Options and Parameters” that specify they can be enabled or disabled.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
To set the value associated with a rendering context option, use the function aglSetInteger. For example, if you enable AGL_SWAP_RECT, you can specify the area of the window that is affected by the aglSwapBuffers function by setting the rectangle size with the function aglSetInteger.
agl.hReturns a string that describes the specified AGL error code.
const GLubyte * aglErrorString ( GLenum code );
An AGL error code returned by the function aglGetError. For a description of these constants, see “Error Codes.”
An error string that describes the error code passed in the code parameter. If the code is invalid, returns the string “No such error code.”
agl.hGets the CGL rendering context associated with an AGL rendering context.
GLboolean aglGetCGLContext ( AGLContext ctx, void **cgl_ctx );
An AGL rendering context.
On return, points to the CGL rendering context associated with the specified AGL rendering context.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
You should use this function only when you absolutely need to use a non-AGL function that requires an CGL rendering context. You can cast the returned CGL rendering context to another data type as needed. Note that destroying the AGL rendering context also destroys the CGL rendering context, thus rendering the data reference returned by this function invalid.
agl.hGets the CGL pixel format object associated with an AGL pixel format.
GLboolean aglGetCGLPixelFormat ( AGLPixelFormat pix, void **cgl_pix );
An AGL pixel format object.
On return, points to the CGL pixel format object associated with the specified AGL pixel format.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
You should use this function only when you absolutely need to pass a CGL pixel format object to a non-AGL function. You can cast the returned CGL pixel format object to another data type as needed. Note that destroying the AGL pixel format object also destroys the CGL pixel format object, thus making the data reference returned invalid.
agl.hReturns the current rendering context.
AGLContext aglGetCurrentContext ( void );
The current rendering context. If there is no current rendering context, returns NULL.
agl.hReturns an AGL error code.
GLenum aglGetError ( void );
The value of the global AGL error flag. See “Error Codes” for a complete description of the error codes that can be returned.
This function is similar to the OpenGL function glGetError. You call the function aglGetError whenever an AGL function returns FALSE to retrieve the error code associated with the error condition. Each error is assigned a numeric code and a symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until aglGetError is called, the error code is returned, and the flag is reset to AGL_NO_ERROR. If a call to aglGetError returns AGL_NO_ERROR, this means that there has been no detectable error since the last call to aglGetError.
agl.hRetrieves the HIView object associated with an AGL context.
HIViewRef aglGetHIViewRef ( AGLContext ctx );
The AGL context whose HIView object you want to retrieve.
The HIView object associated with the context.
agl.hRetrieves the integer setting of an AGL context option.
GLboolean aglGetInteger ( AGLContext ctx, GLenum pname, GLint *params );
An rendering context.
The option whose value you want to retrieve. You can pass any of the constants listed in “Context Options and Parameters” that have an associated value.
On return, points to the value of the option.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is. See “Error Codes” for more information.
Use aglEnable to enable the option.
agl.hRetrieves a pixel buffer and its parameters for a specified rendering context.
GLboolean aglGetPBuffer ( AGLContext ctx, AGLPbuffer *pbuffer, GLint *face, GLint *level, GLint *screen );
A rendering context.
On return, points to the pixel buffer object attached to the rendering context.
On return, points to the cube map face that is set if the pixel buffer texture target type is GL_TEXTURE_CUBE_MAP; otherwise 0 for all other texture target types.
On return, points to the current mipmap level for drawing.
On return, points to the current virtual screen number, as set by the last valid call to aglSetPBuffer.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
agl.hGets the major and minor version numbers of the AGL library.
void aglGetVersion ( GLint *major, GLint *minor );
On return, points to he major version number of the AGL library.
On return, points to the minor version number of the AGL library.
AGL implementations with the same major version number are upwardly compatible, meaning that the implementation with the highest minor number is a superset of the version with the lowest minor number.
Certain features, such as index color support, are deprecated in Mac OS X. The current version of AGL might not be a full superset of AGL for Mac OS 9 or of earlier versions of AGL.
agl.hReturns the current virtual screen number associated with a rendering context.
GLint aglGetVirtualScreen ( AGLContext ctx );
A rendering context.
Returns the virtual screen number of the context. The value is always 0 on a single-monitor system and –1 if the function fails for any reason. If an error occurs, call the function aglGetError to determine what the error is.
The current virtual screen is set automatically by the function aglUpdateContext. The current virtual screen can change when a drawable object is moved or resized across graphics device boundaries. A change in the current virtual screen can affect the return values of some OpenGL functions and in most cases also means that the renderer has changed.
For detailed information on virtual screens, see OpenGL Programming Guide for Mac OS X.
agl.hRetrieves the window associated with an AGL context.
WindowRef aglGetWindowRef ( AGLContext ctx );
The AGL context whose window you want to retrieve.
The window associated with the context.
agl.hReports whether an option is enabled for a rendering context.
GLboolean aglIsEnabled ( AGLContext ctx, GLenum pname );
A rendering context.
The capability whose state you want to check. You can pass any of the constants listed in “Context Options and Parameters” that specify they can be enabled or disabled.
GL_FALSE if the option is disabled or if it fails for any reason; GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
agl.hReturns the next pixel format object in a list of pixel format objects.
AGLPixelFormat aglNextPixelFormat ( AGLPixelFormat pix );
A pointer to pixel format object.
The next pixel format object in a list of pixel formats. Returns NULL if the pix parameter represents the last pixel format object in the list or if the function fails for any reason. If an error occurs, call the function aglGetError to determine what the error is.
You typically use this function after you’ve called the function aglChoosePixelFormat, which generates a list of more than one pixel format object when all the graphics devices on the system are not supported by a single renderer. To find the number of renderers associated with a pixel format object, you can call aglNextPixelFormat to iterate through the list and count the entries.
agl.hReturns the next renderer information object.
AGLRendererInfo aglNextRendererInfo ( AGLRendererInfo rend );
A renderer information object that contains one or more renderer information objects. You obtain a renderer information object by calling the function aglQueryRendererInfo.
The next renderer information object in the list. Returns NULL if the object is the last in the list or if the function fails for any reason. In case of a failure, call the function aglGetError to determine what the error is.
You typically use this function to iterate through a list of renderer information objects returned by the function aglQueryRendererInfo. Most systems have more than one renderer installed because support for different buffer depths is typically provided by separate renderers.
agl.hCreates and returns a renderer information object that contains properties and values for all renderers driving the specified displays.
AGLRendererInfo aglQueryRendererInfoForCGDirectDisplayIDs( const CGDirectDisplayID *dspIDs, GLint ndev );
A pointer to the list of IDs to which you want to restrict the query. . Pass NULL to obtain information for all graphics devices on the system.
The number of graphics devices in dspIDs. Pass 0 if dspIDs is NULL. AGL sets the AGL_BAD_DEVICE error if the ndev parameter is nonzero and the dspIDs parameter is not an array of valid devices.
agl.hResets the AGL library. (Deprecated. This function is not needed in Mac OS X.)
void aglResetLibrary ( void );
agl.hSets the specified rendering context as the current rendering context.
GLboolean aglSetCurrentContext ( AGLContext ctx );
The rendering context to set as the current rendering context. Pass NULL to release the current rendering context without assigning a new one.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
There can be only one current rendering context. Subsequent OpenGL rendering calls operate on the current rendering context to modify the drawable object associated with it.
You can use AGL macros to bypass the current rendering context mechanism and maintain your own current rendering context.
A context is current on a per-thread basis. Multiple threads must serialize calls into the same context.
agl.hAttaches a rendering context to a full screen graphics device.
GLboolean aglSetFullScreen ( AGLContext ctx, GLsizei width, GLsizei height, GLsizei freq, GLint device );
A rendering context.
The width, in pixels, of the graphics device. This value must be an exact match to the graphics device.
The height, in pixels, of the graphics device. This value must be an exact match to the graphics device.
The refresh frequency of the graphics device, in Hertz. If you specify a frequency of 0, AGL uses the highest refresh frequency available for the specified width and height. If you specify a nonzero frequency, AGL chooses the closest frequency available for the given geometry. If a display provides only a 0 refresh frequency, AGL matches it with width and height regardless of the value of frequency passed.
This parameter is ignored in Mac OS X, where all devices that are compatible with the pixel format of the rendering context are considered when selecting a full screen graphics device.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
Passing 0 for the width, 0 for the height, and 0 for the frequency sets up a full screen context at the current height, width, and refresh rate.
After calling this function, subsequent OpenGL rendering calls directed to the full-screen graphics device. The rendering context must be created with respect to a pixel format that supports a full-screen device, which you can request by passing AGL_FULLSCREEN to the function aglChoosePixelFormat. The aglSetFullScreen function also performs all of the actions performed by aglUpdateContext. The aglSetFullScreen function uses information obtained from the pixel format object use to create the rendering context to choose the color depth for full-screen display mode.
When a rendering context is initially attached to a full screen graphics device, its viewport is set to the full size of the device. If the rendering context is subsequently attached to the same device, its viewport is unaltered. To disable a rendering context, call aglSetDrawable with the draw parameter set to NULL.
agl.hSets an AGL context to the specified HIView object.
GLboolean aglSetHIViewRef ( AGLContext ctx, HIViewRef hiview );
An AGL context.
The HIView object to set.
true if the HIView object is successfully set; false otherwise.
agl.hSets the value of an option for a rendering context.
GLboolean aglSetInteger ( AGLContext ctx, GLenum pname, const GLint *params );
A rendering context.
The rendering context option whose value you want to set. You can pass any of the constants listed in “Context Options and Parameters” that have an associated integer value.
A pointer to the value to set the parameter to.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
Use aglEnable to enable the option.
agl.hAttaches a rendering context to an offscreen memory area.
GLboolean aglSetOffScreen ( AGLContext ctx, GLsizei width, GLsizei height, GLsizei rowbytes, GLvoid *baseaddr );
A rendering context returned by the function aglCreateContext.
The width, in pixels, of the offscreen memory area.
The height, in pixels, of the offscreen memory area.
The number of bytes in each row of the offscreen memory area.
A pointer to the base address of the memory area.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If it fails, call the function aglGetError to determine what the error is.
After calling this function, subsequent OpenGL rendering calls modify the offscreen memory. The rendering context must be created with respect to a pixel format that supports offscreen rendering, which you can request by passing AGL_OFFSCREEN to the aglChoosePixelFormat function. The aglSetOffScreen function also performs all of the actions performed by aglUpdateContext. The pixel size of the pixel format is set so that it is equal to the buffer depth of the offscreen area.
When a rendering context is attached to an offscreen memory area, its viewport is set to the full size of the offscreen area.
agl.hAttaches a pixel buffer object to a rendering context.
GLboolean aglSetPBuffer ( AGLContext ctx, AGLPbuffer pbuffer, GLint face, GLint level, GLint screen );
A rendering context.
A pixel buffer object.
The cube map face to draw if the buffer texture target is type GL_TEXTURE_CUBE_MAP; otherwise pass 0.
The mipmap level to draw. This must not exceed the maximum mipmap level set when the pixel buffer object was created. Pass 0 for a texture target that does not support mipmaps.
A virtual screen value. The virtual screen determines the renderer that OpenGL uses to draw to the pixel buffer object. For best performance, for a pixel buffer used as a texture source, you should supply the a virtual screen value that results in using the same renderer used by the context that's the texturing target.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is. See Discussion for more details.
The first time you call this function for a specific pixel buffer object, the system creates the necessary buffers. The buffers are created to support the pixel formats used to create the rendering context. The storage requirements for pixel buffer objects, which can be quite large, are very similar to the requirements for windows or views with OpenGL contexts attached. All drawable objects compete for the same scarce resources. This function can fail is there is not enough contiguous VRAM for each buffer. It's best to code defensively with a scheme that reduces resource consumption without causing the application to resort to failure. Unless, of course, failure is the only viable alternative.
The ability to attach a pbuffer to a context is supported only on renderers that export GL_APPLE_pixel_buffer in the GL_EXTENSIONS string. Before calling this function, you should programmatically determine if it’s possible to attach a pbuffer to a context by querying GL_EXTENSIONS in the context and looking for GL_APPLE_pixel_buffer. If that extension is not present, the renderer won’t allow setting the pbuffer. (In this case, the function correctly returns GL_FALSE, although the error returned by aglGetError may be misleading.)
In order of performance, these are the renderers you should consider using when setting up a rendering context to attach to a pbuffer:
A hardware renderer.
The generic render, but only with an offscreen pixel format and glTexSubImage.
The Apple software renderer, which supports pbuffers in Mac OS X v10.4.8 and later.
agl.hForces subsequent OpenGL commands to the specified virtual screen.
GLboolean aglSetVirtualScreen ( AGLContext ctx, GLint screen );
A rendering context.
A virtual screen number, which must be a value between 0 and the number of virtual screens minus one. You can obtain the number of virtual screens available associated with a rendering context by calling the function aglDescribePixelFormat, passing in the pixel format object used to create the rendering context and the attribute constant AGL_VIRTUAL_SCREEN.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
You should use the aglSetVirtualScreen function only when it is necessary to override the default behavior. The current virtual screen is normally set automatically by the functions aglSetDrawable or aglUpdateContext. Setting the virtual screen forces the renderer associated with the virtual screen to process OpenGL commands issued to the specified context. Changing the virtual screen changes the current renderer. Because the current virtual screen determines which OpenGL renderer is processing commands, the return values of all glGetXXX functions can be affected by the current virtual screen.
For detailed information on virtual screens, see OpenGL Programming Guide for Mac OS X.
agl.hSets an AGL context to the specified window.
GLboolean aglSetWindowRef ( AGLContext ctx, WindowRef window );
An AGL context.
The window to set.
true if the window is successfully set; false otherwise.
agl.hExchanges the front and back buffers of the specified rendering context.
void aglSwapBuffers ( AGLContext ctx );
The rendering context whose buffers you want to swap. AGL sets the AGL_BAD_CONTEXT error if the ctx parameter is not a valid AGL rendering context.
The aglSwapBuffers function either swaps the buffers or copies the back buffer content to the front buffer. Before it returns, aglSwapBuffers invokes the OpenGL function glFlush.
To synchronize with a monitor retrace, set the current swap interval (AGL_SWAP_INTERVAL) to 1 by calling the function aglSetInteger.
agl.hBinds the contents of a pixel buffer to a data source for a texture object.
GLboolean aglTexImagePBuffer ( AGLContext ctx, AGLPbuffer pbuffer, GLint source );
A rendering context, which is the target context for the texture operation. This is the context that you plan to render content to. This is not the context attached to the pixel buffer.
A pixel buffer object.
The source buffer to texture from, which should be a valid OpenGL buffer such as GL_FRONT or GL_BACK and should be compatible with the buffer and renderer attributes that you used to create the rendering context attached to the pixel buffer. This means that the pixel buffer must possess the buffer in question for the texturing operation to succeed.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
You must generate and bind a texture name (using standard OpenGL texturing calls) that is compatible with the pixel buffer texture target. Don't supply a texture object that was used previously for nonpixel buffer texturing operations unless a you first call the OpenGL function glDeleteTextures and then regenerate the texture name.
If you modify the content of a pixel buffer that uses mipmap levels, you must call this function again before drawing with the pixel buffer, to ensure that the content is synchronized with OpenGL. For pixel buffers without mipmaps, simply rebind to the texture object to synchronize content.
No OpenGL texturing calls that modify a pixel buffer texture content are permitted (such as glTexSubImage2D or glCopyTexImage2D) with the pixel buffer texture as the destination. It is permitted to use texturing commands to read data from a pixel buffer texture, such as glCopyTexImage2D, with the pixel buffer texture as the source. It is also legal to use OpenGL functions such as glReadPixels to read the contents of a pixel buffer directly through the pixel buffer context.
Note that texturing with the aglTexImagePBuffer function can fail to produce the intended results without error in the same way other OpenGL texturing commands can normally fail. The function fails if you do not enable the proper texture target, set an incompatible filter mode, or other conditions described in the OpenGL specification.
You don't need to share a context when a pixel buffer object is a texture source. You can use independent pixel formats and OpenGL contexts for both the pixel buffer and the target drawable object without sharing resources, and still texture using a pixel buffer in the target context.
For details on how to use a pixel buffer object as a texture source, see OpenGL Programming Guide for Mac OS X.
agl.hNotifies the rendering context that the window geometry has changed.
GLboolean aglUpdateContext ( AGLContext ctx );
The rendering context that needs updating.
Returns GL_FALSE if it fails for any reason, GL_TRUE otherwise. If an error occurs, call the function aglGetError to determine what the error is.
You must call the aglUpdateContext function any time that the geometry of the drawable object changes. You should call this function after the completion of any move or resize action.
agl.hRepresents a pointer to an opaque AGL context object.
typedef struct __AGLContextRec *AGLContext;
This data type points to a structure that AGL uses to maintain state and other information associated with an OpenGL rendering context. Use the functions described in “Managing Contexts” and “Getting and Setting Context Options” to create, manage, access, and free an AGL context object.
agl.hDefines a reference to a list of graphics devices.
typedef GDHandle AGLDevice;
agl.hDefines an opaque data type that represents a Carbon window.
typedef CGrafPtr AGLDrawable;
This data type points to a structure that AGL uses to keep track of the information needed to transmit rendering operations from bits in memory to the onscreen pixels associated with a Carbon window. This data type is a CGrafPtr "under the hood." The Window Manager function GetWindowPort returns the CGrafPtr associated with a Carbon window.
AGLDrawable data type, which has a very specific meaning. A drawable object can be any rendering destination (pixel buffer, window, offscreen, and so on) while the the AGLDrawable data type is used specifically for a window rendering destination.agl.hRepresents a pointer to an opaque pixel buffer object.
typedef struct __AGLPBufferRec *AGLPbuffer;
This data type points to a structure that AGL uses for hardware accelerated offscreen drawing. Use the functions described in “Managing Pixel Buffers” to create, manage, access, and free a pixel buffer object.
agl.hRepresents a pointer to an opaque pixel format object.
typedef struct __AGLPixelFormatRec *AGLPixelFormat;
This data type points to a structure that AGL uses to maintain pixel format and virtual screen information for a given set of renderer and buffer options. Use the functions described in “Managing Pixel Format Objects” to create, manage, access, and free a pixel format object.
agl.hRepresents a pointer to an opaque renderer information object.
typedef struct __AGLRendererInfoRec *AGLRendererInfo;
This data type points to a structure that AGL uses to maintain information about the renderers associated with a display. Use the functions described in “Getting Renderer Information” to create, access, and free a renderer information object.
agl.hDefine resolutions for the depth and stencil buffers.
#define AGL_0_BIT 0x00000001 #define AGL_1_BIT 0x00000002 #define AGL_2_BIT 0x00000004 #define AGL_3_BIT 0x00000008 #define AGL_4_BIT 0x00000010 #define AGL_5_BIT 0x00000020 #define AGL_6_BIT 0x00000040 #define AGL_8_BIT 0x00000080 #define AGL_10_BIT 0x00000100 #define AGL_12_BIT 0x00000200 #define AGL_16_BIT 0x00000400 #define AGL_24_BIT 0x00000800 #define AGL_32_BIT 0x00001000 #define AGL_48_BIT 0x00002000 #define AGL_64_BIT 0x00004000 #define AGL_96_BIT 0x00008000 #define AGL_128_BIT 0x00010000
AGL_0_BITA bit depth of 0.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_1_BITA bit depth of 1 bit.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_2_BITA bit depth of 2 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_3_BITA bit depth of 3 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_4_BITA bit depth of 4 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_5_BITA bit depth of 5 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_6_BITA bit depth of 6 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_8_BITA bit depth of 7 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_10_BITA bit depth of 10 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_12_BITA bit depth of 12 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_16_BITA bit depth of 16 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_24_BITA bit depth of 24 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_32_BITA bit depth of 32 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_48_BITA bit depth of 48 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_64_BITA bit depth of 64 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_96_BITA bit depth of 96 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_128_BITA bit depth of 128 bits.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
agl.hSpecify attributes used to create a pixel format object.
#define AGL_NONE 0 #define AGL_ALL_RENDERERS 1 #define AGL_BUFFER_SIZE 2 #define AGL_LEVEL 3 #define AGL_RGBA 4 #define AGL_DOUBLEBUFFER 5 #define AGL_STEREO 6 #define AGL_AUX_BUFFERS 7 #define AGL_RED_SIZE 8 #define AGL_GREEN_SIZE 9 #define AGL_BLUE_SIZE 10 #define AGL_ALPHA_SIZE 11 #define AGL_DEPTH_SIZE 12 #define AGL_STENCIL_SIZE 13 #define AGL_ACCUM_RED_SIZE 14 #define AGL_ACCUM_GREEN_SIZE 15 #define AGL_ACCUM_BLUE_SIZE 16 #define AGL_ACCUM_ALPHA_SIZE 17 #define AGL_PIXEL_SIZE 50 #define AGL_MINIMUM_POLICY 51 #define AGL_MAXIMUM_POLICY 52 #define AGL_OFFSCREEN 53 #define AGL_FULLSCREEN 54 #define AGL_SAMPLE_BUFFERS_ARB 55 #define AGL_SAMPLES_ARB 56 #define AGL_AUX_DEPTH_STENCIL 57 #define AGL_COLOR_FLOAT 58 #define AGL_MULTISAMPLE 59 #define AGL_SUPERSAMPLE 60 #define AGL_SAMPLE_ALPHA 61
AGL_NONEUsed to terminate a pixel format attribute list.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ALL_RENDERERSThis constant is a Boolean attribute. If it is present in the attributes array, pixel format selection is open to all available renderers, including debug and special-purpose renderers that are not OpenGL compliant. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BUFFER_SIZEThe associated value is a nonnegative integer that specifies the number of bits per color buffer. For RGBA pixel formats, the buffer size is the sum of the red, green, blue, and alpha sizes. For color index pixel formats, the buffer size is the size of the color indexes. The smallest color index buffer of at least the specified size is preferred. Ignored if the AGL_RGBA attribute is asserted.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_LEVELThe associated value is an integer that specifies the frame buffer level of the pixel format. Positive levels correspond to frame buffers that overlay the default buffer, and negative levels correspond to frame buffers that underlay the default level. Buffer level zero corresponds to the default frame buffer of the display. Buffer level one is the first overlay frame buffer, level two the second overlay frame buffer, and so on. Negative buffer levels correspond to underlay frame buffers.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGBAThis constant is a Boolean attribute. If it is present in the attributes array, specifies that the color buffers store red, green, blue, and alpha values. In this case, only RGBA pixel formats are considered. Do not supply a value with this constant because its presence in the array implies true.
If this attribute is not present in the attributes array, color buffers store color indexes. In this case, only color index pixel formats are considered.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_DOUBLEBUFFERThis constant is a Boolean attribute. If it is present in the attributes array, only double-buffered pixel formats are considered. Otherwise, only single-buffered pixel formats are considered. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_STEREOThis constant is a Boolean attribute. If it is present in the attributes array, only stereo pixel formats are considered. Otherwise, only monoscopic pixel formats are considered. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_AUX_BUFFERSThe associated value is a nonnegative integer that specifies the number of auxiliary buffers that are available. A value of 0 indicates that no auxiliary buffers exist. Pixel formats with the smallest number of auxiliary buffers that meet or exceed the specified number are preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RED_SIZEThe associated value is a nonnegative integer that specifies the number of red component bits. The value is 0 if the AGL_RGBA attribute is GL_FALSE. A red buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_GREEN_SIZEThe associated value is a nonnegative integer that specifies the number of green component bits. The value is 0 if the AGL_RGBA attribute is GL_FALSE. A green buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BLUE_SIZEThe associated value is a nonnegative integer that specifies the number of blue component bits. The value is 0 if the AGL_RGBA attribute is GL_FALSE. A blue buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ALPHA_SIZEThe associated value is a nonnegative integer that specifies the number of alpha component bits. The value is 0 if the AGL_RGBA attribute is GL_FALSE. An alpha buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_DEPTH_SIZEThe associated value is a nonnegative integer that specifies the number of bits in the depth buffer. A depth buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_STENCIL_SIZEThe associated value is a nonnegative integer that specifies the number of bits in the stencil buffer. The smallest stencil buffer of at least the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCUM_RED_SIZEThe associated value is a nonnegative integer that specifies the number of bits of red stored in the accumulation buffer. A red accumulation buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCUM_GREEN_SIZEThe associated value is a nonnegative integer that specifies the number of bits of green stored in the accumulation buffer. A green accumulation buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCUM_BLUE_SIZEThe associated value is a nonnegative integer that specifies the number of bits of blue stored in the accumulation buffer. A blue accumulation buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCUM_ALPHA_SIZEThe associated value is a nonnegative integer that specifies the number of bits of alpha stored in the accumulation buffer. An alpha accumulation buffer that most closely matches the specified size is preferred.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_PIXEL_SIZEThe associated value is a nonnegative integer that specifies the number frame buffer bits per pixel. The pixel size is the number of bits required to store each pixel in the color buffer, including unused bits. If the pixel format has an alpha channel that is stored in a separate buffer, its size is not included in the pixel size.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MINIMUM_POLICYThis constant is a Boolean attribute. If it is present in the attributes array, the pixel format choosing policy is altered for the color, depth, and accumulation buffers such that only buffers of size greater than or equal to the desired size are considered. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MAXIMUM_POLICYThis constant is a Boolean attribute. If it is present in the attributes array, the pixel format choosing policy is altered for the color, depth, and accumulation buffers such that, if a nonzero buffer size is requested, the largest available buffer is preferred. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_OFFSCREENThis constant is a Boolean attribute. If it is present in the attributes array, only renderers that are capable of rendering to an off-screen memory area and have buffer depth exactly equal to the desired buffer depth are considered. Do not supply a value with this constant because its presence in the array implies true, and thereby enables the attribute.
If enabled, and if the drawable object currently attached to a rendering context is an offscreen drawable object, the associated values are the width, height, and row bytes of the offscreen memory area. If enabled, and if the drawable object is not an offscreen type, the width, height, and row bytes are each 0. When the AGL_OFFSCREEN attribute is present, the AGL_CLOSEST_POLICY attribute is implied.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_FULLSCREENThis constant is a Boolean attribute. If it is present in the attributes array, only renderers that are capable of rendering to a full-screen drawable object are considered. Furthermore, the gdevs parameter must be set to a pointer to the GDevice on which full-screen rendering is desired and the ndev parameter must be set to 1.
If present, and if the drawable object that is currently attached to a rendering context is a full-screen drawable object, the associated values are the width, height, and refresh frequency of the full-screen device, rounded to the nearest integer. If present, and if the drawable object is not a full-screen type, the width, height, and refresh frequency are each 0.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_SAMPLE_BUFFERS_ARBThe associated value is the number of multisample buffers.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_SAMPLES_ARBThe associated value is the number of samples per multisample buffer.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_AUX_DEPTH_STENCILThe associated value is the independent depth and/or the stencil buffers for the auxiliary buffer.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_COLOR_FLOATThis constant is a Boolean attribute. If it is present in the attributes array, color buffers store floating-point pixels. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_MULTISAMPLEThis constant is a Boolean attribute. If it is present in the attributes array, specifies a hint to the driver to prefer multisampling. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_SUPERSAMPLEThis constant is a Boolean attribute. If it is present in the attributes array, specifies a hint to the driver to prefer supersampling. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_SAMPLE_ALPHAThis constant is a Boolean attribute. If it is present in the attributes array, request alpha filtering when multisampling. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
Each of these constants can be assigned to the the attribute array passed to the function aglChoosePixelFormat. They can also be passed to the function aglDescribePixelFormat.
agl.hDefine constants used to set buffer modes.
#define AGL_MONOSCOPIC_BIT 0x00000001 #define AGL_STEREOSCOPIC_BIT 0x00000002 #define AGL_SINGLEBUFFER_BIT 0x00000004 #define AGL_DOUBLEBUFFER_BIT 0x00000008
AGL_MONOSCOPIC_BITA left buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_STEREOSCOPIC_BITA left and right buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_SINGLEBUFFER_BITA front buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_DOUBLEBUFFER_BITA front and back buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
agl.hSpecify formats and color channel layout information for the color buffer.
#define AGL_RGB8_BIT 0x00000001 #define AGL_RGB8_A8_BIT 0x00000002 #define AGL_BGR233_BIT 0x00000004 #define AGL_BGR233_A8_BIT 0x00000008 #define AGL_RGB332_BIT 0x00000010 #define AGL_RGB332_A8_BIT 0x00000020 #define AGL_RGB444_BIT 0x00000040 #define AGL_ARGB4444_BIT 0x00000080 #define AGL_RGB444_A8_BIT 0x00000100 #define AGL_RGB555_BIT 0x00000200 #define AGL_ARGB1555_BIT 0x00000400 #define AGL_RGB555_A8_BIT 0x00000800 #define AGL_RGB565_BIT 0x00001000 #define AGL_RGB565_A8_BIT 0x00002000 #define AGL_RGB888_BIT 0x00004000 #define AGL_ARGB8888_BIT 0x00008000 #define AGL_RGB888_A8_BIT 0x00010000 #define AGL_RGB101010_BIT 0x00020000 #define AGL_ARGB2101010_BIT 0x00040000 #define AGL_RGB101010_A8_BIT 0x00080000 #define AGL_RGB121212_BIT 0x00100000 #define AGL_ARGB12121212_BIT 0x00200000 #define AGL_RGB161616_BIT 0x00400000 #define AGL_ARGB16161616_BIT 0x00800000 #define AGL_INDEX8_BIT 0x20000000 #define AGL_INDEX16_BIT 0x40000000 #define AGL_RGBFLOAT64_BIT 0x01000000 #define AGL_RGBAFLOAT64_BIT 0x02000000 #define AGL_RGBFLOAT128_BIT 0x04000000 #define AGL_RGBAFLOAT128_BIT 0x08000000 #define AGL_RGBFLOAT256_BIT 0x01000000 #define AGL_RGBAFLOAT256_BIT 0x02000000
AGL_RGB8_BITSpecifies a format that has 8 bits per pixel with an RGB channel layout: RGB=7:0, inverse color map.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB8_A8_BITSpecifies an 8-8 ARGB bits per pixel format and the channels located in the following bits: A=7:0, RGB=7:0, inverse color map.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BGR233_BITSpecifies a format that has 8 bits per pixel with an RGB channel layout, and the channels located in the following bits: B=7:6, G=5:3, R=2:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BGR233_A8_BITSpecifies an 8-8 ARGB bits per pixel format and the channels located in the following bits: A=7:0, B=7:6, G=5:3, R=2:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB332_BITSpecifies a format that has 8 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=7:5, G=4:2, B=1:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB332_A8_BITSpecifies an 8-8 ARGB bits per pixel format and the channels located in the following bits: A=7:0, R=7:5, G=4:2, B=1:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB444_BITSpecifies a format that has 16 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=11:8, G=7:4, B=3:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB4444_BITSpecifies a format that has 16 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=15:12, R=11:8, G=7:4, B=3:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB444_A8_BITSpecifies a format that has 8-16 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=7:0, R=11:8, G=7:4, B=3:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB555_BITSpecifies a format that has 16 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=14:10, G=9:5, B=4:0. The top bit is not used.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB1555_BITSpecifies a format that has 16 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=15, R=14:10, G=9:5, B=4:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB555_A8_BITSpecifies a format that has 8-16 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=7:0, R=14:10, G=9:5, B=4:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB565_BITSpecifies a format that has 16 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=15:11, G=10:5, B=4:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB565_A8_BITSpecifies a format that has 8-16 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=7:0, R=15:11, G=10:5, B=4:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB888_BITSpecifies a format that has 32 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=23:16, G=15:8, B=7:0; R, G, and B take 1 byte each.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB8888_BITSpecifies a format that has 32 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=31:24, R=23:16, G=15:8, B=7:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB888_A8_BITSpecifies a format that has 8-32 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=7:0, R=23:16, G=15:8, B=7:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB101010_BITSpecifies a format that has 32 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=29:20, G=19:10, B=9:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB2101010_BITSpecifies a format that has 32 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=31:30 R=29:20, G=19:10, B=9:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB101010_A8_BITSpecifies a format that has 8-32 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=7:0 R=29:20, G=19:10, B=9:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB121212_BITSpecifies a format that has 48 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=35:24, G=23:12, B=11:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB12121212_BITSpecifies a format that has 48 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=47:36, R=35:24, G=23:12, B=11:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGB161616_BITSpecifies a format that has 64 bits per pixel with an RGB channel layout, and the channels located in the following bits: R=47:32, G=31:16, B=15:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ARGB16161616_BITSpecifies a format that has 64 bits per pixel with an ARGB channel layout, and the channels located in the following bits: A=63:48, R=47:32, G=31:16, B=15:0
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_INDEX8_BITSpecifies an 8 bit color look up table. (Deprecated)
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_INDEX16_BITSpecifies an 16 bit color look up table. (Deprecated)
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RGBFLOAT64_BITSpecifies a format that has 64 bits per pixel with an RGB channel layout, half-floating point values. (A half-float is a 16-bit floating-point value.)
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_RGBAFLOAT64_BITSpecifies a format that has 64 bits per pixel with an ARGB channel layout, half-floating point values. (A half-float is a 16-bit floating-point value.)
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_RGBFLOAT128_BITSpecifies a format that has 128 bits per pixel with an RGB channel layout, IEEE floating point values.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_RGBAFLOAT128_BITSpecifies a format that has 128 bits per pixel with an ARGB channel layout, IEEE floating point values.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_RGBFLOAT256_BITSpecifies a format that has 256 bits per pixel with an RGB channel layout, IEEE double values.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_RGBAFLOAT256_BITSpecifies a format that has 256 bits per pixel with an ARGB channel layout, IEEE double values.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
agl.hDefine options and parameters that apply to a specific rendering context.
#define AGL_SWAP_RECT 200 #define AGL_BUFFER_RECT 202 #define AGL_SWAP_LIMIT 203 #define AGL_COLORMAP_TRACKING 210 #define AGL_COLORMAP_ENTRY 212 #define AGL_RASTERIZATION 220 #define AGL_SWAP_INTERVAL 222 #define AGL_STATE_VALIDATION 230 #define AGL_BUFFER_NAME 231 #define AGL_ORDER_CONTEXT_TO_FRONT 232 #define AGL_CONTEXT_SURFACE_ID 233 #define AGL_CONTEXT_DISPLAY_ID 234 #define AGL_SURFACE_ORDER 235 #define AGL_SURFACE_OPACITY 236 #define AGL_CLIP_REGION 254 #define AGL_FS_CAPTURE_SINGLE 255 #define AGL_SURFACE_BACKING_SIZE 304 #define AGL_ENABLE_SURFACE_BACKING_SIZE 305 #define AGL_SURFACE_VOLATILE 306
AGL_SWAP_RECTEnable or set the swap rectangle. The associated parameter must contain four values: the x and y window coordinates of the swap rectangle, followed by its width and height. If enabled, the area of the window that is affected by the function aglSwapBuffers is restricted to a subrectangle of the entire window.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BUFFER_RECTEnable or set the buffer rectangle. The associated parameter must contain four values: the x and y window coordinates of the buffer rectangle, relative to the structure bounds of the window, followed by its width and height. If enabled, the drawable rectangle of the window and all of its associated buffers are restricted to the specified rectangle.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_SWAP_LIMITEnable or disable the swap asynchronous limit.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_COLORMAP_TRACKINGEnable or disable color map tracking.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_COLORMAP_ENTRYThe associated value is a color map entry specifies as {index, r, g, b}.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RASTERIZATIONEnable or disable all rasterization of 2D and 3D primitives. You can use this option to debug and characterize the performance of an OpenGL driver without actually rendering.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_SWAP_INTERVALThe associated parameter contains one value: the current swap interval setting. A value of 0 specifies not to synchronize to the vertical retrace. All other values indicate to synchronize to the vertical retrace.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_STATE_VALIDATIONEnables or disables state validation for multiscreen functionality. If enabled, the AGL library inspects the rendering context state each time that the function aglUpdateContext is called to ensure that it is in an appropriate state for switching between renderers. Normally, the state is inspected only when it is actually necessary to switch renderers. This option is useful when you want to use a single monitor system to test that an application will perform correctly on a multiple monitor system.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BUFFER_NAMEThe associated value is a buffer name. You can use this option to allow multiple OpenGL contexts to share a buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ORDER_CONTEXT_TO_FRONTSpecifies to order the current rendering context in front of all the other contexts.
Available in Mac OS X v10.1 and later.
Declared in agl.h.
AGL_CONTEXT_SURFACE_IDThe associated value is the ID of the drawable surface for the rendering context. You can’t set this value because the system sets it. However, you can retrieve the value using the function aglGetInteger.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_CONTEXT_DISPLAY_IDThe associated value is a list of the display IDs of all displays touched by the rendering context, up to a maximum of 32 displays. You can’t set this list of values because the system assigns display ID values. However, you can retrieve the value using the function aglGetInteger.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_SURFACE_ORDERThe associated value is the position of the OpenGL surface relative to the window. A value of 1 means that the position is above the window; a value of –1 specifies a position that is below the window.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_SURFACE_OPACITYThe associated value specifies the opacity of the OpenGL surface. A value of 1 means the surface is opaque (the default); 0 means completely transparent.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_CLIP_REGIONEnables or sets the drawable clipping region. The associated value is a rgnHandle data type that defines the clipping region.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_FS_CAPTURE_SINGLEEnables the capture of a single display for full-screen rendering. This option is disabled by default.
Available in Mac OS X v10.2 and later.
Declared in agl.h.
AGL_SURFACE_BACKING_SIZEThe associated value specifies the width and height of surface backing size.
Available in Mac OS X v10.4 and later.
Declared in agl.h.
AGL_ENABLE_SURFACE_BACKING_SIZEEnable or disable the surface backing-size override.
Available in Mac OS X v10.4 and later.
Declared in agl.h.
AGL_SURFACE_VOLATILEFlags the surface as a candidate for deletion.
Available in Mac OS X v10.4 and later.
Declared in agl.h.
agl.hDefines the error codes that can be returned by the aglGetError function.
#define AGL_NO_ERROR 0 #define AGL_BAD_ATTRIBUTE 10000 #define AGL_BAD_PROPERTY 10001 #define AGL_BAD_PIXELFMT 10002 #define AGL_BAD_RENDINFO 10003 #define AGL_BAD_CONTEXT 10004 #define AGL_BAD_DRAWABLE 10005 #define AGL_BAD_GDEV 10006 #define AGL_BAD_STATE 10007 #define AGL_BAD_VALUE 10008 #define AGL_BAD_MATCH 10009 #define AGL_BAD_ENUM 10010 #define AGL_BAD_OFFSCREEN 10011 #define AGL_BAD_FULLSCREEN 10012 #define AGL_BAD_WINDOW 10013 #define AGL_BAD_POINTER 10014 #define AGL_BAD_MODULE 10015 #define AGL_BAD_ALLOC 10016 #define AGL_BAD_CONNECTION 10017
AGL_NO_ERRORNo error.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_ATTRIBUTEInvalid pixel format attribute.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_PROPERTYInvalid renderer property.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_PIXELFMTInvalid pixel format.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_RENDINFOInvalid renderer info.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_CONTEXTInvalid rendering context.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_DRAWABLEInvalid drawable object. A change of virtual screens (renderers) fails if the surface width and height cannot be set to the values requested, or if the creation of a drawable object or surfaces needed to support a pixel buffer fails for other reasons.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_GDEVInvalid graphics device.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_STATEInvalid rendering context state.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_VALUEInvalid numerical value.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_MATCHInvalid share rendering context.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_ENUMInvalid enumerant.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_OFFSCREENInvalid offscreen drawable object.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_FULLSCREENInvalid full-screen drawable object.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_WINDOWInvalid window.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_POINTERInvalid pointer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_MODULEInvalid code module.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_ALLOCMemory allocation failure.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BAD_CONNECTIONUnable to connect to the window server.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
Unlike many Carbon APIs, AGL functions don’t return result codes for specific error conditions. Instead, AGL functions that fail either return GL_FALSE or NULL. You can find out the specific nature of the error by calling the function aglGetError, which returns the appropriate error code.
agl.hSpecify options that apply globally.
#define AGL_FORMAT_CACHE_SIZE 501 #define AGL_CLEAR_FORMAT_CACHE 502 #define AGL_RETAIN_RENDERERS 503
AGL_FORMAT_CACHE_SIZEThe associated value is the size of the positive pixel format cache and is initially set to 5. If your application needs to use n different attribute lists to choose n different pixel formats repeatedly, then the application should set the cache size to n to maximize performance. After your application calls the aglChoosePixelFormat function for the last time, you might want to set the cache size to 1 to minimize the memory used by the AGL library.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_CLEAR_FORMAT_CACHEWhen the associated value is nonzero, specifies to reset the pixel format cache. Clearing the cache does not affect the size of the cache for future storage of pixel formats. To minimize the memory consumed by the cache, your application should also set the cache size to 1.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RETAIN_RENDERERSSpecifies whether or not to retain loaded plug-in renderers in memory. When the associated value is nonzero, the AGL library will not unload any plug-in renderers even if they are no longer in use. This option is useful to improve the performance of applications that repeatedly destroy and recreate their only (or last) rendering context. Normally, when the last rendering context created by a particular plug-in renderer is destroyed, that renderer is unloaded from memory. When the associated value is zero, AGL returns to its normal mode of operation and all renderers that are not in use are unloaded.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
You can pass any of these options, along with the appropriate value, to the function aglConfigure.
agl.hDefine options for managing renderers.
#define AGL_RENDERER_ID 70 #define AGL_SINGLE_RENDERER 71 #define AGL_NO_RECOVERY 72 #define AGL_ACCELERATED 73 #define AGL_CLOSEST_POLICY 74 #define AGL_ROBUST 75 #define AGL_BACKING_STORE 76 #define AGL_MP_SAFE 78 #define AGL_WINDOW 80 #define AGL_MULTISCREEN 81 #define AGL_VIRTUAL_SCREEN 82 #define AGL_COMPLIANT 83 #define AGL_PBUFFER 90 #define AGL_REMOTE_PBUFFER 91
AGL_RENDERER_IDThe associated value is a nonnegative integer that specifies a renderer. If present, OpenGL renderers that match the specified ID are preferred. See “Renderer IDs” for possible values. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_SINGLE_RENDERERThis constant is a Boolean attribute. If it is present in the attributes array, specifies that a single pixel format represents a single renderer for all screens. On systems with multiple screens, this option disables the ability of the AGL library to drive different monitors through different graphics accelerator cards with a single AGL rendering context.. Do not supply a value with this constant because its presence in the array implies true.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_NO_RECOVERYThis constant is a Boolean attribute. If it is present in the attributes array, specifies that failure recovery features are disabled for this pixel format. Normally, if an accelerated renderer cannot attach to a drawable object due to insufficient video memory, AGL automatically switches to another renderer. This attribute disables these features so that rendering will always be done by the chosen renderer. For example, with this option enabled, you won't get a software renderer as a fallback if a hardware-accelerated renderer runs out of resources.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCELERATEDThis constant is a Boolean attribute. If it is present in the attributes array, specifies renderers that are attached to a hardware accelerated graphics device. It is usually impossible to support more than one accelerated graphics device, because typically when a window spans more than one device, OpenGL uses the software renderer. You can pass this constant to the function aglDescribeRenderer to find out whether a particular renderer is hardware accelerated.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_CLOSEST_POLICYThe associated value specifies a color buffer size. When set, this option alters the pixel format choosing policy such that a color buffer closest to the requested size is preferred, regardless of the actual color buffer depth of the supported graphics device.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ROBUSTThis constant is a Boolean attribute. If it is present in the attributes array, specifies that AGL should consider only those renderers that do not have any failure modes associated with a lack of video card resources. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_BACKING_STOREThis constant is a Boolean attribute. If it is present in the attributes array, specifies that AGL should consider only those renderers that have a back color buffer the full size of the drawable object (regardless of window visibility). AGL guarantees that the back buffer contents will be valid after a call to the aglSwapBuffers function. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MP_SAFEThis constant is a Boolean attribute. If it is present in the attributes array, specifies a renderer that is multiprocessor safe. This attribute is deprecated in Mac OS X because all renderers can accept commands for threads running on a second processor. However, this does not mean that all renderers are thread-safe or reentrant.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_WINDOWThis constant is a Boolean attribute. If it is present in the attributes array, specifies that the pixel format can be used to render to an onscreen window. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MULTISCREENThis constant is a Boolean attribute. If it is present in the attributes array, specifies that the renderer is capable of driving multiple screens with the same rendering context. (A single window can span multiple screens.) You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_VIRTUAL_SCREENThe associated value is an integer that specifies the virtual screen number of the pixel format.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_COMPLIANTThis constant is a Boolean attribute. If it is present in the attributes array, specifies a pixel format that is fully compliant with OpenGL. All Mac OS X renderers are OpenGL-compliant. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_PBUFFERThis constant is a Boolean attribute. If it is present in the attributes array, specifies that the renderer can render to a pixel buffer. You can pass this constant to the function aglDescribeRenderer.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
AGL_REMOTE_PBUFFERThis constant is a Boolean attribute. If it is present in the attributes array, specifies that the renderer can render offline to a pixel buffer.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
agl.hDefine constants that specify hardware and software renderers.
#define AGL_RENDERER_GENERIC_ID 0x00020200 #define AGL_RENDERER_GENERIC_FLOAT_ID 0x00020400 #define AGL_RENDERER_APPLE_SW_ID 0x00020600 #define AGL_RENDERER_ATI_RAGE_128_ID 0x00021000 #define AGL_RENDERER_ATI_RADEON_ID 0x00021200 #define AGL_RENDERER_ATI_RAGE_PRO_ID 0x00021400 #define AGL_RENDERER_ATI_RADEON_8500_ID 0x00021600 #define AGL_RENDERER_ATI_RADEON_9700_ID 0x00021800 #define AGL_RENDERER_ATI_RADEON_X1000_ID 0x00021900 #define AGL_RENDERER_NVIDIA_GEFORCE_2MX_ID 0x00022000 #define AGL_RENDERER_NVIDIA_GEFORCE_3_ID 0x00022200 #define AGL_RENDERER_NVIDIA_GEFORCE_FX_ID 0x00022400 #define AGL_RENDERER_VT_BLADE_XP2_ID 0x00023000 #define AGL_RENDERER_INTEL_900_ID 0x00024000 #define AGL_RENDERER_MESA_3DFX_ID 0x00040000
AGL_RENDERER_GENERIC_IDA generic display device. (Deprecated. Deprecated on Intel-based Macintosh computers.)
Available in Mac OS X v10.0 and later.
Declared in aglRenderers.h.
AGL_RENDERER_GENERIC_FLOAT_IDA floating-point software renderer that is optimized for vector-based processors, is programmable, and supports shading.
Available in Mac OS X v10.3 and later.
Declared in aglRenderers.h.
AGL_RENDERER_APPLE_SW_IDThe Apple software renderer.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RAGE_128_IDAn ATI Rage 128 display device.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RADEON_IDAn ATI Radeon display device.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RAGE_PRO_IDAn ATI Rage Pro display device.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RADEON_8500_IDAn ATI Radeon 8500 display device.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RADEON_9700_IDAn ATI Radeon 9700 display device.
Available in Mac OS X v10.3 and later.
Declared in aglRenderers.h.
AGL_RENDERER_ATI_RADEON_X1000_IDAn ATI Radeon 9700 display device.
Available in Mac OS X v10.5 and later.
Declared in aglRenderers.h.
AGL_RENDERER_NVIDIA_GEFORCE_2MX_IDAn NVIDIA GeForce 2MX display device or an NVIDIA GeForce 4MX.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_NVIDIA_GEFORCE_3_IDAn NVIDIA GeForce 3 display device or an NVIDIA GeForce 4 Ti.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
AGL_RENDERER_NVIDIA_GEFORCE_FX_IDAn NVIDIA GeForce FX, GeForce 6, or GeForce 7 display device.
Available in Mac OS X v10.3 and later.
Declared in aglRenderers.h.
AGL_RENDERER_VT_BLADE_XP2_IDA Village Tronic display device.
Available in Mac OS X v10.3 and later.
Declared in aglRenderers.h.
AGL_RENDERER_INTEL_900_IDAn Intel GMA 900 display device.
Available in Mac OS X v10.5 and later.
Declared in aglRenderers.h.
AGL_RENDERER_MESA_3DFX_IDA Mesa 3DFX display device.
Available in Mac OS X v10.2 and later.
Declared in aglRenderers.h.
aglrenderers.hSpecify constants that you can use to query renderer properties.
#define AGL_BUFFER_MODES 100 #define AGL_MIN_LEVEL 101 #define AGL_MAX_LEVEL 102 #define AGL_COLOR_MODES 103 #define AGL_ACCUM_MODES 104 #define AGL_DEPTH_MODES 105 #define AGL_STENCIL_MODES 106 #define AGL_MAX_AUX_BUFFERS 107 #define AGL_VIDEO_MEMORY 120 #define AGL_TEXTURE_MEMORY 121 #define AGL_RENDERER_COUNT 128
AGL_BUFFER_MODESThe associated value can be a bitwise OR of the any of the constants specified in “Buffer Mode Flags.”
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MIN_LEVELThe associated value specifies the minimum overlay buffer level. Negative values indicate an underlay buffer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MAX_LEVELThe associated value specifies the maximum overlay buffer level.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_COLOR_MODESThe associated value can be a bitwise OR of any of the constants specified in “Color Modes.”
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_ACCUM_MODESThe associated value can be a bitwise OR of any of the constants specified in “Color Modes.”
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_DEPTH_MODESThe associated value can be the bitwise OR of any of the constants specified in “Bit Depths.”
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_STENCIL_MODESThe associated value can be the bitwise OR of any of the constants specified in “Bit Depths.”
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_MAX_AUX_BUFFERSThe associated value is the maximum number of auxiliary buffers that can be supported by the renderer.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_VIDEO_MEMORYThe associated value is the amount of video memory.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_TEXTURE_MEMORYThe associated value is the amount of texture memory.
Available in Mac OS X v10.0 and later.
Declared in agl.h.
AGL_RENDERER_COUNTThe associated value is the number of renderers.
Available in Mac OS X v10.3 and later.
Declared in agl.h.
You can pass these constants to the function aglDescribeRenderer to find out the property value for a specific renderer.
agl.hLast updated: 2007-10-31