Thepolicy attributeskCGLPFAMinimumPolicyandkCGLPFAMaximumPolicy
are applicable only to the color, depth, and accumulation buffer sizes. If you
specify the minimum policy, then these attributes must have at least the value
speci?¬?ed with the attribute. In our example, we??™ve requested that the pixel format
be chosen using only pixel formats that are double buffered, have at least
24 bits for the R/G/B color channels, and that there be at least 16 bits for the
depth buffer.
Here is the set of policy attributes:
kCGLPFAMinimumPolicy
kCGLPFAMaximumPolicy
kCGLPFAClosestPolicy
Pixel Format Selection 59
The minimum policy sets the low bar for acceptance, but there is another
asymmetry here: kCGLPFAMaximumPolicy doesn??™t set the high bar for acceptance.
Instead, it means that if kCGLPFAColorSize, kCGLPFADepthSize,
or kCGLPFAAccumSize is speci?¬?ed with a non-zero value, then the largest
possible corresponding buffer size will be chosen for your pixel format
object.
kCGLPFAClosestPolicy is applicable to only the color buffer size attribute
kCGLPFAColorSize; it does not consider the size speci?¬?ed for the depth or
accumulation buffers. With this attribute, the color buffer size of the returned
pixel format object will most closely match the requested size. This policy is
most similar to the behavior that the X11 window system uses when choosing
visuals.
As you may have gathered by now, kCGLPFAMinimumPolicy is the default
policy for buffer sizing.
Pages:
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133