Roderick Colenbrander : wined3d: Ask for enough RGB bits for pbuffers.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 29 07:48:10 CDT 2007


Module: wine
Branch: master
Commit: 9be5a5e9dbc4127e655ce711d950630453965472
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9be5a5e9dbc4127e655ce711d950630453965472

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Tue Aug 28 22:40:26 2007 +0200

wined3d: Ask for enough RGB bits for pbuffers.

---

 dlls/wined3d/context.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 6dce228..c7622cb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -136,7 +136,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
     if(create_pbuffer) {
         HDC hdc_parent = GetDC(win_handle);
         int iPixelFormat = 0;
-        short red, green, blue, alphaBits, colorBits;
+        short redBits, greenBits, blueBits, alphaBits, colorBits;
         short depthBits, stencilBits;
 
         IWineD3DSurface *StencilSurface = This->stencilBufferTarget;
@@ -147,11 +147,14 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
         unsigned int nFormats;
 
         /* Retrieve the specifications for the pixelformat from the backbuffer / stencilbuffer */
-        getColorBits(target->resource.format, &red, &green, &blue, &alphaBits, &colorBits);
+        getColorBits(target->resource.format, &redBits, &greenBits, &blueBits, &alphaBits, &colorBits);
         getDepthStencilBits(StencilBufferFormat, &depthBits, &stencilBits);
         PUSH2(WGL_DRAW_TO_PBUFFER_ARB, 1); /* We need pbuffer support; doublebuffering isn't needed */
         PUSH2(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB); /* Make sure we don't get a float or color index format */
         PUSH2(WGL_COLOR_BITS_ARB, colorBits);
+        PUSH2(WGL_RED_BITS_ARB, redBits);
+        PUSH2(WGL_GREEN_BITS_ARB, greenBits);
+        PUSH2(WGL_BLUE_BITS_ARB, blueBits);
         PUSH2(WGL_ALPHA_BITS_ARB, alphaBits);
         PUSH2(WGL_DEPTH_BITS_ARB, depthBits);
         PUSH2(WGL_STENCIL_BITS_ARB, stencilBits);




More information about the wine-cvs mailing list