Lines Matching +full:mode +full:-
18 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
38 #include <dix-config.h>
99 * be returned. Otherwise -1 will be returned.
110 return ((unsigned)(visualType - GLX_TRUE_COLOR) < NUM_VISUAL_TYPES) in _gl_convert_to_x_visual_type()
111 ? x_visual_types[visualType - GLX_TRUE_COLOR] : -1; in _gl_convert_to_x_visual_type()
115 * Copy a GLX visual config structure to a GL context mode structure. All
116 * of the fields in \c config are copied to \c mode. Additional fields in
117 * \c mode that can be derived from the fields of \c config (i.e.,
118 * \c haveDepthBuffer) are also filled in. The remaining fields in \c mode
121 * \param mode Destination GL context mode.
129 _gl_copy_visual_to_context_mode(__GLcontextModes * mode, in _gl_copy_visual_to_context_mode() argument
132 __GLcontextModes * const next = mode->next; in _gl_copy_visual_to_context_mode()
134 (void)_mesa_memset(mode, 0, sizeof(__GLcontextModes)); in _gl_copy_visual_to_context_mode()
135 mode->next = next; in _gl_copy_visual_to_context_mode()
137 mode->visualID = config->vid; in _gl_copy_visual_to_context_mode()
138 mode->visualType = _gl_convert_from_x_visual_type(config->class); in _gl_copy_visual_to_context_mode()
139 mode->fbconfigID = config->vid; in _gl_copy_visual_to_context_mode()
140 mode->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; in _gl_copy_visual_to_context_mode()
142 mode->rgbMode = (config->rgba != 0); in _gl_copy_visual_to_context_mode()
143 mode->renderType = (mode->rgbMode) ? GLX_RGBA_BIT : GLX_COLOR_INDEX_BIT; in _gl_copy_visual_to_context_mode()
145 mode->colorIndexMode = !(mode->rgbMode); in _gl_copy_visual_to_context_mode()
146 mode->doubleBufferMode = (config->doubleBuffer != 0); in _gl_copy_visual_to_context_mode()
147 mode->stereoMode = (config->stereo != 0); in _gl_copy_visual_to_context_mode()
149 mode->haveAccumBuffer = ((config->accumRedSize + in _gl_copy_visual_to_context_mode()
150 config->accumGreenSize + in _gl_copy_visual_to_context_mode()
151 config->accumBlueSize + in _gl_copy_visual_to_context_mode()
152 config->accumAlphaSize) > 0); in _gl_copy_visual_to_context_mode()
153 mode->haveDepthBuffer = (config->depthSize > 0); in _gl_copy_visual_to_context_mode()
154 mode->haveStencilBuffer = (config->stencilSize > 0); in _gl_copy_visual_to_context_mode()
156 mode->redBits = config->redSize; in _gl_copy_visual_to_context_mode()
157 mode->greenBits = config->greenSize; in _gl_copy_visual_to_context_mode()
158 mode->blueBits = config->blueSize; in _gl_copy_visual_to_context_mode()
159 mode->alphaBits = config->alphaSize; in _gl_copy_visual_to_context_mode()
160 mode->redMask = config->redMask; in _gl_copy_visual_to_context_mode()
161 mode->greenMask = config->greenMask; in _gl_copy_visual_to_context_mode()
162 mode->blueMask = config->blueMask; in _gl_copy_visual_to_context_mode()
163 mode->alphaMask = config->alphaMask; in _gl_copy_visual_to_context_mode()
164 mode->rgbBits = mode->rgbMode ? config->bufferSize : 0; in _gl_copy_visual_to_context_mode()
165 mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0; in _gl_copy_visual_to_context_mode()
167 mode->accumRedBits = config->accumRedSize; in _gl_copy_visual_to_context_mode()
168 mode->accumGreenBits = config->accumGreenSize; in _gl_copy_visual_to_context_mode()
169 mode->accumBlueBits = config->accumBlueSize; in _gl_copy_visual_to_context_mode()
170 mode->accumAlphaBits = config->accumAlphaSize; in _gl_copy_visual_to_context_mode()
171 mode->depthBits = config->depthSize; in _gl_copy_visual_to_context_mode()
172 mode->stencilBits = config->stencilSize; in _gl_copy_visual_to_context_mode()
174 mode->numAuxBuffers = config->auxBuffers; in _gl_copy_visual_to_context_mode()
175 mode->level = config->level; in _gl_copy_visual_to_context_mode()
177 mode->visualRating = config->visualRating; in _gl_copy_visual_to_context_mode()
178 mode->transparentPixel = config->transparentPixel; in _gl_copy_visual_to_context_mode()
179 mode->transparentRed = config->transparentRed; in _gl_copy_visual_to_context_mode()
180 mode->transparentGreen = config->transparentGreen; in _gl_copy_visual_to_context_mode()
181 mode->transparentBlue = config->transparentBlue; in _gl_copy_visual_to_context_mode()
182 mode->transparentAlpha = config->transparentAlpha; in _gl_copy_visual_to_context_mode()
183 mode->transparentIndex = config->transparentIndex; in _gl_copy_visual_to_context_mode()
184 mode->samples = config->multiSampleSize; in _gl_copy_visual_to_context_mode()
185 mode->sampleBuffers = config->nMultiSampleBuffers; in _gl_copy_visual_to_context_mode()
186 /* mode->visualSelectGroup = config->visualSelectGroup; ? */ in _gl_copy_visual_to_context_mode()
188 mode->swapMethod = GLX_SWAP_UNDEFINED_OML; in _gl_copy_visual_to_context_mode()
190 mode->bindToTextureRgb = (mode->rgbMode) ? GL_TRUE : GL_FALSE; in _gl_copy_visual_to_context_mode()
191 mode->bindToTextureRgba = (mode->rgbMode && mode->alphaBits) ? in _gl_copy_visual_to_context_mode()
193 mode->bindToMipmapTexture = mode->rgbMode ? GL_TRUE : GL_FALSE; in _gl_copy_visual_to_context_mode()
194 mode->bindToTextureTargets = mode->rgbMode ? in _gl_copy_visual_to_context_mode()
198 mode->yInverted = GL_FALSE; in _gl_copy_visual_to_context_mode()
202 * Get data from a GL context mode.
204 * \param mode GL context mode whose data is to be returned.
205 * \param attribute Attribute of \c mode that is to be returned.
206 * \param value_return Location to store the data member of \c mode.
207 * \return If \c attribute is a valid attribute of \c mode, zero is
211 _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute, in _gl_get_context_mode_data() argument
220 *value_return = mode->rgbBits; in _gl_get_context_mode_data()
224 *value_return = mode->rgbMode; in _gl_get_context_mode_data()
228 *value_return = mode->redBits; in _gl_get_context_mode_data()
232 *value_return = mode->greenBits; in _gl_get_context_mode_data()
236 *value_return = mode->blueBits; in _gl_get_context_mode_data()
240 *value_return = mode->alphaBits; in _gl_get_context_mode_data()
244 *value_return = mode->doubleBufferMode; in _gl_get_context_mode_data()
248 *value_return = mode->stereoMode; in _gl_get_context_mode_data()
252 *value_return = mode->numAuxBuffers; in _gl_get_context_mode_data()
256 *value_return = mode->depthBits; in _gl_get_context_mode_data()
260 *value_return = mode->stencilBits; in _gl_get_context_mode_data()
264 *value_return = mode->accumRedBits; in _gl_get_context_mode_data()
268 *value_return = mode->accumGreenBits; in _gl_get_context_mode_data()
272 *value_return = mode->accumBlueBits; in _gl_get_context_mode_data()
276 *value_return = mode->accumAlphaBits; in _gl_get_context_mode_data()
280 *value_return = mode->level; in _gl_get_context_mode_data()
284 *value_return = mode->transparentPixel; in _gl_get_context_mode_data()
288 *value_return = mode->transparentRed; in _gl_get_context_mode_data()
292 *value_return = mode->transparentGreen; in _gl_get_context_mode_data()
296 *value_return = mode->transparentBlue; in _gl_get_context_mode_data()
300 *value_return = mode->transparentAlpha; in _gl_get_context_mode_data()
304 *value_return = mode->transparentIndex; in _gl_get_context_mode_data()
308 *value_return = mode->visualType; in _gl_get_context_mode_data()
312 *value_return = mode->visualRating; in _gl_get_context_mode_data()
316 *value_return = mode->visualID; in _gl_get_context_mode_data()
320 *value_return = mode->drawableType; in _gl_get_context_mode_data()
324 *value_return = mode->renderType; in _gl_get_context_mode_data()
328 *value_return = mode->xRenderable; in _gl_get_context_mode_data()
332 *value_return = mode->fbconfigID; in _gl_get_context_mode_data()
336 *value_return = mode->maxPbufferWidth; in _gl_get_context_mode_data()
340 *value_return = mode->maxPbufferHeight; in _gl_get_context_mode_data()
344 *value_return = mode->maxPbufferPixels; in _gl_get_context_mode_data()
348 *value_return = mode->optimalPbufferWidth; in _gl_get_context_mode_data()
352 *value_return = mode->optimalPbufferHeight; in _gl_get_context_mode_data()
356 *value_return = mode->swapMethod; in _gl_get_context_mode_data()
360 *value_return = mode->sampleBuffers; in _gl_get_context_mode_data()
364 *value_return = mode->samples; in _gl_get_context_mode_data()
368 *value_return = mode->bindToTextureRgb; in _gl_get_context_mode_data()
372 *value_return = mode->bindToTextureRgba; in _gl_get_context_mode_data()
376 *value_return = mode->bindToMipmapTexture == GL_TRUE ? GL_TRUE : in _gl_get_context_mode_data()
381 *value_return = mode->bindToTextureTargets; in _gl_get_context_mode_data()
385 *value_return = mode->yInverted; in _gl_get_context_mode_data()
404 * zero or \c GLX_DONT_CARE (which is -1). As support for additional
412 * DRI-based driver.
423 * extend the \c __GLcontextModes data-structure.
444 (*next)->visualID = GLX_DONT_CARE; in _gl_context_modes_create()
445 (*next)->visualType = GLX_DONT_CARE; in _gl_context_modes_create()
446 (*next)->visualRating = GLX_NONE; in _gl_context_modes_create()
447 (*next)->transparentPixel = GLX_NONE; in _gl_context_modes_create()
448 (*next)->transparentRed = GLX_DONT_CARE; in _gl_context_modes_create()
449 (*next)->transparentGreen = GLX_DONT_CARE; in _gl_context_modes_create()
450 (*next)->transparentBlue = GLX_DONT_CARE; in _gl_context_modes_create()
451 (*next)->transparentAlpha = GLX_DONT_CARE; in _gl_context_modes_create()
452 (*next)->transparentIndex = GLX_DONT_CARE; in _gl_context_modes_create()
453 (*next)->xRenderable = GLX_DONT_CARE; in _gl_context_modes_create()
454 (*next)->fbconfigID = GLX_DONT_CARE; in _gl_context_modes_create()
455 (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML; in _gl_context_modes_create()
456 (*next)->bindToTextureRgb = GLX_DONT_CARE; in _gl_context_modes_create()
457 (*next)->bindToTextureRgba = GLX_DONT_CARE; in _gl_context_modes_create()
458 (*next)->bindToMipmapTexture = GLX_DONT_CARE; in _gl_context_modes_create()
459 (*next)->bindToTextureTargets = GLX_DONT_CARE; in _gl_context_modes_create()
460 (*next)->yInverted = GLX_DONT_CARE; in _gl_context_modes_create()
462 next = &((*next)->next); in _gl_context_modes_create()
479 __GLcontextModes * const next = modes->next; in _gl_context_modes_destroy()
487 * Find a context mode matching a Visual ID.
489 * \param modes List list of context-mode structures to be searched.
491 * \returns A pointer to a context-mode in \c modes if \c vid was found in
500 for (m = modes; m != NULL; m = m->next) in _gl_context_modes_find_visual()
501 if (m->visualID == vid) in _gl_context_modes_find_visual()
512 for (m = modes; m != NULL; m = m->next) in _gl_context_modes_find_fbconfig()
513 if (m->fbconfigID == fbid) in _gl_context_modes_find_fbconfig()
520 * Determine if two context-modes are the same. This is intended to be used
523 * \param a Context-mode to be compared.
524 * \param b Context-mode to be compared.
525 * \returns \c GL_TRUE if the two context-modes are the same. \c GL_FALSE is
532 return ((a->rgbMode == b->rgbMode) && in _gl_context_modes_are_same()
533 (a->floatMode == b->floatMode) && in _gl_context_modes_are_same()
534 (a->colorIndexMode == b->colorIndexMode) && in _gl_context_modes_are_same()
535 (a->doubleBufferMode == b->doubleBufferMode) && in _gl_context_modes_are_same()
536 (a->stereoMode == b->stereoMode) && in _gl_context_modes_are_same()
537 (a->redBits == b->redBits) && in _gl_context_modes_are_same()
538 (a->greenBits == b->greenBits) && in _gl_context_modes_are_same()
539 (a->blueBits == b->blueBits) && in _gl_context_modes_are_same()
540 (a->alphaBits == b->alphaBits) && in _gl_context_modes_are_same()
541 #if 0 /* For some reason these don't get set on the client-side in libGL. */ in _gl_context_modes_are_same()
542 (a->redMask == b->redMask) && in _gl_context_modes_are_same()
543 (a->greenMask == b->greenMask) && in _gl_context_modes_are_same()
544 (a->blueMask == b->blueMask) && in _gl_context_modes_are_same()
545 (a->alphaMask == b->alphaMask) && in _gl_context_modes_are_same()
547 (a->rgbBits == b->rgbBits) && in _gl_context_modes_are_same()
548 (a->indexBits == b->indexBits) && in _gl_context_modes_are_same()
549 (a->accumRedBits == b->accumRedBits) && in _gl_context_modes_are_same()
550 (a->accumGreenBits == b->accumGreenBits) && in _gl_context_modes_are_same()
551 (a->accumBlueBits == b->accumBlueBits) && in _gl_context_modes_are_same()
552 (a->accumAlphaBits == b->accumAlphaBits) && in _gl_context_modes_are_same()
553 (a->depthBits == b->depthBits) && in _gl_context_modes_are_same()
554 (a->stencilBits == b->stencilBits) && in _gl_context_modes_are_same()
555 (a->numAuxBuffers == b->numAuxBuffers) && in _gl_context_modes_are_same()
556 (a->level == b->level) && in _gl_context_modes_are_same()
557 (a->visualRating == b->visualRating) && in _gl_context_modes_are_same()
559 (a->transparentPixel == b->transparentPixel) && in _gl_context_modes_are_same()
561 ((a->transparentPixel != GLX_TRANSPARENT_RGB) || in _gl_context_modes_are_same()
562 ((a->transparentRed == b->transparentRed) && in _gl_context_modes_are_same()
563 (a->transparentGreen == b->transparentGreen) && in _gl_context_modes_are_same()
564 (a->transparentBlue == b->transparentBlue) && in _gl_context_modes_are_same()
565 (a->transparentAlpha == b->transparentAlpha))) && in _gl_context_modes_are_same()
567 ((a->transparentPixel != GLX_TRANSPARENT_INDEX) || in _gl_context_modes_are_same()
568 (a->transparentIndex == b->transparentIndex)) && in _gl_context_modes_are_same()
570 (a->sampleBuffers == b->sampleBuffers) && in _gl_context_modes_are_same()
571 (a->samples == b->samples) && in _gl_context_modes_are_same()
572 ((a->drawableType & b->drawableType) != 0) && in _gl_context_modes_are_same()
573 (a->renderType == b->renderType) && in _gl_context_modes_are_same()
574 (a->maxPbufferWidth == b->maxPbufferWidth) && in _gl_context_modes_are_same()
575 (a->maxPbufferHeight == b->maxPbufferHeight) && in _gl_context_modes_are_same()
576 (a->maxPbufferPixels == b->maxPbufferPixels) && in _gl_context_modes_are_same()
577 (a->optimalPbufferWidth == b->optimalPbufferWidth) && in _gl_context_modes_are_same()
578 (a->optimalPbufferHeight == b->optimalPbufferHeight) && in _gl_context_modes_are_same()
579 (a->swapMethod == b->swapMethod) && in _gl_context_modes_are_same()
580 (a->bindToTextureRgb == b->bindToTextureRgb) && in _gl_context_modes_are_same()
581 (a->bindToTextureRgba == b->bindToTextureRgba) && in _gl_context_modes_are_same()
582 (a->bindToMipmapTexture == b->bindToMipmapTexture) && in _gl_context_modes_are_same()
583 (a->bindToTextureTargets == b->bindToTextureTargets) && in _gl_context_modes_are_same()
584 (a->yInverted == b->yInverted)); in _gl_context_modes_are_same()