Index: dxgltest/Resource.h |
— | — | @@ -39,6 +39,7 @@ |
40 | 40 | #define IDC_TEXTUREPREVIEW 1003
|
41 | 41 | #define IDC_DISPLAY 1004
|
42 | 42 | #define IDC_TESTLIST 1004
|
| 43 | +#define IDC_BGCOLOR 1007
|
43 | 44 | #define IDC_WINDOWED 1008
|
44 | 45 | #define IDC_FULLSCREEN 1009
|
45 | 46 | #define IDC_APIVER 1012
|
— | — | @@ -111,3 +112,4 @@ |
112 | 113 | #define IDC_FOGEND 1099
|
113 | 114 | #define IDC_FOGDENSITY 1100
|
114 | 115 | #define IDC_RANGEBASEDFOG 1101
|
| 116 | +#define IDC_BGCOLORSELECT 1102
|
Index: dxgltest/Tests3D.cpp |
— | — | @@ -53,6 +53,7 @@ |
54 | 54 | static WORD cube_mesh[] = {0,1,2, 2,1,3, 4,5,6, 6,5,7, 8,9,10, 10,9,11, 12,13,14, 14,13,15, 16,17,18,
|
55 | 55 | 18,17,19, 20,21,22, 22,21,23 };
|
56 | 56 | static D3DLIGHT7 lights[8];
|
| 57 | +static DWORD bgcolor = 0;
|
57 | 58 |
|
58 | 59 | typedef struct
|
59 | 60 | {
|
— | — | @@ -465,30 +466,30 @@ |
466 | 467 | normals[3] = D3DVECTOR(-1.0f,0.0f,0.0f);
|
467 | 468 | normals[4] = D3DVECTOR(0.0f,1.0f,0.0f);
|
468 | 469 | normals[5] = D3DVECTOR(0.0f,-10.0f,0.0f);
|
469 | | - vertices[0] = D3DVERTEX(points[0],normals[0],0,0);
|
470 | | - vertices[1] = D3DVERTEX(points[1],normals[0],1,0);
|
471 | | - vertices[2] = D3DVERTEX(points[2],normals[0],0,1);
|
472 | | - vertices[3] = D3DVERTEX(points[3],normals[0],1,1);
|
473 | | - vertices[4] = D3DVERTEX(points[2],normals[1],0,0);
|
474 | | - vertices[5] = D3DVERTEX(points[3],normals[1],1,0);
|
475 | | - vertices[6] = D3DVERTEX(points[4],normals[1],0,1);
|
476 | | - vertices[7] = D3DVERTEX(points[5],normals[1],1,1);
|
477 | | - vertices[8] = D3DVERTEX(points[4],normals[2],0,0);
|
478 | | - vertices[9] = D3DVERTEX(points[5],normals[2],1,0);
|
479 | | - vertices[10] = D3DVERTEX(points[6],normals[2],0,1);
|
480 | | - vertices[11] = D3DVERTEX(points[7],normals[2],1,1);
|
481 | | - vertices[12] = D3DVERTEX(points[6],normals[3],0,0);
|
482 | | - vertices[13] = D3DVERTEX(points[7],normals[3],1,0);
|
483 | | - vertices[14] = D3DVERTEX(points[0],normals[3],0,1);
|
484 | | - vertices[15] = D3DVERTEX(points[1],normals[3],1,1);
|
485 | | - vertices[16] = D3DVERTEX(points[1],normals[4],0,0);
|
486 | | - vertices[17] = D3DVERTEX(points[7],normals[4],1,0);
|
487 | | - vertices[18] = D3DVERTEX(points[3],normals[4],0,1);
|
488 | | - vertices[19] = D3DVERTEX(points[5],normals[4],1,1);
|
489 | | - vertices[20] = D3DVERTEX(points[6],normals[5],0,0);
|
490 | | - vertices[21] = D3DVERTEX(points[0],normals[5],1,0);
|
491 | | - vertices[22] = D3DVERTEX(points[4],normals[5],0,1);
|
492 | | - vertices[23] = D3DVERTEX(points[2],normals[5],1,1);
|
| 470 | + vertices[0] = D3DVERTEX(points[0],normals[0],0,1);
|
| 471 | + vertices[1] = D3DVERTEX(points[1],normals[0],0,0);
|
| 472 | + vertices[2] = D3DVERTEX(points[2],normals[0],1,1);
|
| 473 | + vertices[3] = D3DVERTEX(points[3],normals[0],1,0);
|
| 474 | + vertices[4] = D3DVERTEX(points[2],normals[1],0,1);
|
| 475 | + vertices[5] = D3DVERTEX(points[3],normals[1],0,0);
|
| 476 | + vertices[6] = D3DVERTEX(points[4],normals[1],1,1);
|
| 477 | + vertices[7] = D3DVERTEX(points[5],normals[1],1,0);
|
| 478 | + vertices[8] = D3DVERTEX(points[4],normals[2],0,1);
|
| 479 | + vertices[9] = D3DVERTEX(points[5],normals[2],0,0);
|
| 480 | + vertices[10] = D3DVERTEX(points[6],normals[2],1,1);
|
| 481 | + vertices[11] = D3DVERTEX(points[7],normals[2],1,0);
|
| 482 | + vertices[12] = D3DVERTEX(points[6],normals[3],0,1);
|
| 483 | + vertices[13] = D3DVERTEX(points[7],normals[3],0,0);
|
| 484 | + vertices[14] = D3DVERTEX(points[0],normals[3],1,1);
|
| 485 | + vertices[15] = D3DVERTEX(points[1],normals[3],1,0);
|
| 486 | + vertices[16] = D3DVERTEX(points[1],normals[4],0,1);
|
| 487 | + vertices[17] = D3DVERTEX(points[7],normals[4],0,0);
|
| 488 | + vertices[18] = D3DVERTEX(points[3],normals[4],1,1);
|
| 489 | + vertices[19] = D3DVERTEX(points[5],normals[4],1,0);
|
| 490 | + vertices[20] = D3DVERTEX(points[6],normals[5],0,1);
|
| 491 | + vertices[21] = D3DVERTEX(points[0],normals[5],0,0);
|
| 492 | + vertices[22] = D3DVERTEX(points[4],normals[5],1,1);
|
| 493 | + vertices[23] = D3DVERTEX(points[2],normals[5],1,0);
|
493 | 494 | }
|
494 | 495 |
|
495 | 496 | DDPIXELFORMAT texformats[256];
|
— | — | @@ -545,6 +546,7 @@ |
546 | 547 | D3DMATRIX matProj;
|
547 | 548 | D3DMATRIX mat;
|
548 | 549 | D3DMATERIAL7 material;
|
| 550 | + bgcolor = 0;
|
549 | 551 | switch(test)
|
550 | 552 | {
|
551 | 553 | case 0:
|
— | — | @@ -675,7 +677,7 @@ |
676 | 678 | ZeroMemory(&ddsd,sizeof(DDSURFACEDESC2));
|
677 | 679 | if(d3dver >= 3) ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
678 | 680 | else ddsd.dwSize = sizeof(DDSURFACEDESC);
|
679 | | - error = d3d7dev->Clear(0,NULL,D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,0,1.0,0);
|
| 681 | + error = d3d7dev->Clear(0,NULL,D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,bgcolor,1.0,0);
|
680 | 682 | float time = (float)clock() / (float)CLOCKS_PER_SEC;
|
681 | 683 | switch(test)
|
682 | 684 | {
|
— | — | @@ -1199,7 +1201,6 @@ |
1200 | 1202 | d3d7dev->SetTextureStageState(number,D3DTSS_ALPHAARG2,texshaderstate.texstages[number].alphaarg2);
|
1201 | 1203 | }
|
1202 | 1204 | break;
|
1203 | | - }
|
1204 | 1205 | case IDC_COLOROP:
|
1205 | 1206 | if(HIWORD(wParam) == CBN_SELCHANGE)
|
1206 | 1207 | {
|
— | — | @@ -1216,6 +1217,15 @@ |
1217 | 1218 | d3d7dev->SetTextureStageState(number,D3DTSS_ALPHAOP,texshaderstate.texstages[number].alphaop);
|
1218 | 1219 | }
|
1219 | 1220 | break;
|
| 1221 | + case IDC_BGCOLOR:
|
| 1222 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1223 | + {
|
| 1224 | + SendDlgItemMessage(hWnd,IDC_BGCOLOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1225 | + _stscanf(tmpstring,_T("%x"),&bgcolor);
|
| 1226 | + }
|
| 1227 | + break;
|
| 1228 | + }
|
| 1229 | + break;
|
1220 | 1230 | case WM_CLOSE:
|
1221 | 1231 | ddinterface->Release();
|
1222 | 1232 | EndDialog(hWnd,IDCANCEL);
|
Index: dxgltest/dxgltest.rc |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |