PEXGetAncillaryBufferInfo - Get Ancillary Buffer Information (5.2)


Synopsis

 
  Status PEXGetAncillaryBufferInfo(
       Display *display,
       Drawable drawable,
       unsigned long num_visuals,
       unsigned long num_depths,
       VisualID  *visual_ids,
       unsigned long *depths,
       PEXAncillaryBufferInfo ***visual_info,
       PEXAncillaryBufferInfo ***depth_info
   )
 

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

drawable
The resource identifier of a drawable used to identify the screen for which the information is to be obtained.

num_visuals
The number of visuals.

num_depths
The number of pixmap depths.

visual_ids
The list of visual IDs about which you want information returned.

depths
The list of pixmap depths about which you want information returned.

visual_info
The address of a pointer to an array of pointers to PEXAncillaryBufferInfo. The function stores the address of the array in the supplied pointer.

depth_info
The address of a pointer to an array of pointers to PEXAncillaryBufferInfo. The function stores the address of the array in the supplied pointer.

Returns

Zero if successful; otherwise, one of the following return values:

PEXBadLocalAlloc
Indicates that this function ran out of memory.

Description

Invoke PEXGetAncillaryBufferInfo to retrieve information about Z-buffers, alpha buffers, and accumulation buffers associated with visuals or pixmap depths.

This function returns the address of an array of pointers to the PEXAncillaryBufferInfo data structure. You invoke the function and use the returned data as follows:

 
  PEXAncillaryBufferInfo **info;
  unsigned long depths[]={8,24};
 
  PEXGetAncillaryBufferInfo(display, win, 0, 2, NULL, depths, NULL, &info);
accum_depth8 = info[0]->accum_depth; accum_depth24 = info[1]->accum_depth; PEXFreeAncillaryBufferInfo(display, 0, 2, NULL, info);

PEXlib allocates memory for the returned array of pointers and PEXAncillaryBufferInfo structures. Invoke the PEXFreeAncillaryBufferInfo function to deallocate this memory. (See Freeing Memory Allocated by PEXlib functions.

Errors

BadDrawable
The specified drawable resource identifier is invalid.

BadValue
One of the specified visual_ids is invalid.

See Also

For an overview, see PEXlib Access and Information Functions.