儲存庫 vbox 的更動 20398
- 時間撮記:
- 2009-6-8 下午12:55:54 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/common/crOpenGL/icd_drv.c
r15820 r20398 25 25 #include "cr_gl.h" 26 26 #include "stub.h" 27 #include "cr_mem.h" 27 28 28 29 #include <windows.h> … … 118 119 crDebug( "DrvSetPixelFormat called.\n" ); 119 120 120 if ( iPixelFormat != 1) {121 if ( (iPixelFormat<1) || (iPixelFormat>2) ) { 121 122 crError( "wglSetPixelFormat: iPixelFormat=%d?\n", iPixelFormat ); 122 123 } … … 180 181 { 181 182 if ( !pfd ) { 182 return 1; /* There's only one, baby */183 return 2; 183 184 } 184 185 185 186 if ( nBytes != sizeof(*pfd) ) { 186 187 crWarning( "DrvDescribePixelFormat: nBytes=%u?\n", nBytes ); 187 return 1; /* There's only one, baby */ 188 } 189 190 pfd->nSize = sizeof(*pfd); 191 pfd->nVersion = 1; 192 pfd->dwFlags = ( PFD_DRAW_TO_WINDOW | 193 PFD_SUPPORT_GDI | 194 PFD_SUPPORT_OPENGL | 195 PFD_DOUBLEBUFFER ); 196 pfd->iPixelType = PFD_TYPE_RGBA; 197 pfd->cColorBits = 32; 198 pfd->cRedBits = 8; 199 pfd->cRedShift = 24; 200 pfd->cGreenBits = 8; 201 pfd->cGreenShift = 16; 202 pfd->cBlueBits = 8; 203 pfd->cBlueShift = 8; 204 pfd->cAlphaBits = 8; 205 pfd->cAlphaShift = 0; 206 pfd->cAccumBits = 0; 207 pfd->cAccumRedBits = 0; 208 pfd->cAccumGreenBits = 0; 209 pfd->cAccumBlueBits = 0; 210 pfd->cAccumAlphaBits = 0; 211 pfd->cDepthBits = 32; 212 pfd->cStencilBits = 8; 213 pfd->cAuxBuffers = 0; 214 pfd->iLayerType = PFD_MAIN_PLANE; 215 pfd->bReserved = 0; 216 pfd->dwLayerMask = 0; 217 pfd->dwVisibleMask = 0; 218 pfd->dwDamageMask = 0; 188 return 2; 189 } 190 191 if (iPixelFormat==1) 192 { 193 crMemZero(pfd, sizeof(*pfd)); 194 195 pfd->nSize = sizeof(*pfd); 196 pfd->nVersion = 1; 197 pfd->dwFlags = (PFD_DRAW_TO_WINDOW | 198 PFD_SUPPORT_OPENGL | 199 PFD_DOUBLEBUFFER); 200 pfd->iPixelType = PFD_TYPE_RGBA; 201 pfd->cColorBits = 32; 202 pfd->cRedBits = 8; 203 pfd->cRedShift = 24; 204 pfd->cGreenBits = 8; 205 pfd->cGreenShift = 16; 206 pfd->cBlueBits = 8; 207 pfd->cBlueShift = 8; 208 pfd->cAlphaBits = 8; 209 pfd->cAlphaShift = 0; 210 pfd->cAccumBits = 0; 211 pfd->cAccumRedBits = 0; 212 pfd->cAccumGreenBits = 0; 213 pfd->cAccumBlueBits = 0; 214 pfd->cAccumAlphaBits = 0; 215 pfd->cDepthBits = 32; 216 pfd->cStencilBits = 8; 217 pfd->cAuxBuffers = 0; 218 pfd->iLayerType = PFD_MAIN_PLANE; 219 pfd->bReserved = 0; 220 pfd->dwLayerMask = 0; 221 pfd->dwVisibleMask = 0; 222 pfd->dwDamageMask = 0; 223 } 224 else 225 { 226 crMemZero(pfd, sizeof(*pfd)); 227 pfd->nVersion = 1; 228 pfd->dwFlags = (PFD_DRAW_TO_WINDOW| 229 PFD_SUPPORT_OPENGL); 230 231 pfd->iPixelType = PFD_TYPE_RGBA; 232 pfd->cColorBits = 32; 233 pfd->cRedBits = 8; 234 pfd->cRedShift = 16; 235 pfd->cGreenBits = 8; 236 pfd->cGreenShift = 8; 237 pfd->cBlueBits = 8; 238 pfd->cBlueShift = 0; 239 pfd->cAlphaBits = 0; 240 pfd->cAlphaShift = 0; 241 pfd->cAccumBits = 64; 242 pfd->cAccumRedBits = 16; 243 pfd->cAccumGreenBits = 16; 244 pfd->cAccumBlueBits = 16; 245 pfd->cAccumAlphaBits = 0; 246 pfd->cDepthBits = 16; 247 pfd->cStencilBits = 8; 248 pfd->cAuxBuffers = 0; 249 pfd->iLayerType = PFD_MAIN_PLANE; 250 pfd->bReserved = 0; 251 pfd->dwLayerMask = 0; 252 pfd->dwVisibleMask = 0; 253 pfd->dwDamageMask = 0; 254 } 219 255 220 256 /* the max PFD index */ 221 return 1;257 return 2; 222 258 } 223 259
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器