diff options
author | José Fonseca <[email protected]> | 2009-04-10 10:14:13 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-04-10 13:26:35 +0100 |
commit | 3f2420e2e07b7ae0d2feec81178f998a1e46d631 (patch) | |
tree | 1533b7fc8fd8f761fde9bd1cb02b8cbb79c32f1c /src/gallium/state_trackers | |
parent | 2921a4903378e2bfc461322a5443cc013e7414c9 (diff) |
wgl: Combine alpha pixelformat info in color.
Diffstat (limited to 'src/gallium/state_trackers')
4 files changed, 12 insertions, 26 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c index a4f78cb2932..140bb43caad 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c +++ b/src/gallium/state_trackers/wgl/shared/stw_arbpixelformat.c @@ -185,11 +185,11 @@ stw_query_attrib( break; case WGL_ALPHA_BITS_ARB: - *pvalue = (int) pf->alpha.alphabits; + *pvalue = (int) pf->color.alphabits; break; case WGL_ALPHA_SHIFT_ARB: - *pvalue = (int) pf->alpha.alphashift; + *pvalue = (int) pf->color.alphashift; break; case WGL_ACCUM_BITS_ARB: diff --git a/src/gallium/state_trackers/wgl/shared/stw_context.c b/src/gallium/state_trackers/wgl/shared/stw_context.c index 6eb1bd08d56..f7098198c0e 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_context.c +++ b/src/gallium/state_trackers/wgl/shared/stw_context.c @@ -115,7 +115,7 @@ stw_create_layer_context( pf->color.redbits, pf->color.greenbits, pf->color.bluebits, - pf->alpha.alphabits, + pf->color.alphabits, 0, pf->depth.depthbits, pf->depth.stencilbits, diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c index bb4009f1b41..92f668433f3 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c +++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.c @@ -43,57 +43,48 @@ stw_add_standard_pixelformats( uint flags ) { struct stw_pixelformat_info *pf = *ppf; - struct stw_pixelformat_color_info color24 = { 8, 0, 8, 8, 8, 16 }; - struct stw_pixelformat_alpha_info noalpha = { 0, 0 }; - struct stw_pixelformat_alpha_info alpha8 = { 8, 24 }; + struct stw_pixelformat_color_info color24 = { 8, 0, 8, 8, 8, 16, 0, 0 }; + struct stw_pixelformat_color_info color24a8 = { 8, 0, 8, 8, 8, 16, 8, 24 }; struct stw_pixelformat_depth_info depth24s8 = { 24, 8 }; struct stw_pixelformat_depth_info depth16 = { 16, 0 }; pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags; pf->color = color24; - pf->alpha = noalpha; pf->depth = depth24s8; pf++; pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags; - pf->color = color24; - pf->alpha = alpha8; + pf->color = color24a8; pf->depth = depth24s8; pf++; pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags; pf->color = color24; - pf->alpha = noalpha; pf->depth = depth16; pf++; pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags; - pf->color = color24; - pf->alpha = alpha8; + pf->color = color24a8; pf->depth = depth16; pf++; pf->flags = flags; pf->color = color24; - pf->alpha = noalpha; pf->depth = depth24s8; pf++; pf->flags = flags; - pf->color = color24; - pf->alpha = alpha8; + pf->color = color24a8; pf->depth = depth24s8; pf++; pf->flags = flags; pf->color = color24; - pf->alpha = noalpha; pf->depth = depth16; pf++; pf->flags = flags; - pf->color = color24; - pf->alpha = alpha8; + pf->color = color24a8; pf->depth = depth16; pf++; @@ -171,8 +162,8 @@ stw_pixelformat_describe( ppfd->cGreenShift = pf->color.greenshift; ppfd->cBlueBits = pf->color.bluebits; ppfd->cBlueShift = pf->color.blueshift; - ppfd->cAlphaBits = pf->alpha.alphabits; - ppfd->cAlphaShift = pf->alpha.alphashift; + ppfd->cAlphaBits = pf->color.alphabits; + ppfd->cAlphaShift = pf->color.alphashift; ppfd->cAccumBits = 0; ppfd->cAccumRedBits = 0; ppfd->cAccumGreenBits = 0; @@ -225,7 +216,7 @@ int stw_pixelformat_choose( HDC hdc, if (ppfd->cStencilBits != pf->depth.stencilbits) delta += 2; - if (ppfd->cAlphaBits != pf->alpha.alphabits) + if (ppfd->cAlphaBits != pf->color.alphabits) delta++; if (delta < bestdelta) { diff --git a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h index cdf687c472b..b7807f712bf 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h +++ b/src/gallium/state_trackers/wgl/shared/stw_pixelformat.h @@ -42,10 +42,6 @@ struct stw_pixelformat_color_info uint greenshift; uint bluebits; uint blueshift; -}; - -struct stw_pixelformat_alpha_info -{ uint alphabits; uint alphashift; }; @@ -60,7 +56,6 @@ struct stw_pixelformat_info { uint flags; struct stw_pixelformat_color_info color; - struct stw_pixelformat_alpha_info alpha; struct stw_pixelformat_depth_info depth; }; |