Index: dxgltest/Resource.h |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | #define IDC_DXDIAG 1000
|
33 | 33 | #define IDC_SPINSTAGE 1000
|
34 | 34 | #define IDC_VIDMODES 1000
|
| 35 | +#define IDC_LIGHTENABLED 1001
|
35 | 36 | #define IDC_RESIZABLE 1001
|
36 | 37 | #define IDC_SPINALPHAREF 1001
|
37 | 38 | #define IDC_DDTYPE 1002
|
Index: dxgltest/Tests3D.cpp |
— | — | @@ -1313,6 +1313,14 @@ |
1314 | 1314 | d3d7dev->SetRenderState(D3DRENDERSTATE_TEXTUREFACTOR,number);
|
1315 | 1315 | }
|
1316 | 1316 | break;
|
| 1317 | + case IDC_FOGCOLOR:
|
| 1318 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1319 | + {
|
| 1320 | + SendDlgItemMessage(hWnd,IDC_FOGCOLOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1321 | + _stscanf(tmpstring,_T("%x"),&number);
|
| 1322 | + d3d7dev->SetRenderState(D3DRENDERSTATE_FOGCOLOR,number);
|
| 1323 | + }
|
| 1324 | + break;
|
1317 | 1325 | case IDC_TEXCOLORKEY:
|
1318 | 1326 | if(HIWORD(wParam) == EN_CHANGE)
|
1319 | 1327 | {
|
— | — | @@ -1390,6 +1398,7 @@ |
1391 | 1399 | f = (float)_ttof(tmpstring);
|
1392 | 1400 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGSTART, *((LPDWORD)(&f)));
|
1393 | 1401 | }
|
| 1402 | + break;
|
1394 | 1403 | case IDC_FOGEND:
|
1395 | 1404 | if(HIWORD(wParam) == EN_CHANGE)
|
1396 | 1405 | {
|
— | — | @@ -1397,6 +1406,7 @@ |
1398 | 1407 | f = (float)_ttof(tmpstring);
|
1399 | 1408 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGEND, *((LPDWORD)(&f)));
|
1400 | 1409 | }
|
| 1410 | + break;
|
1401 | 1411 | case IDC_FOGDENSITY:
|
1402 | 1412 | if(HIWORD(wParam) == EN_CHANGE)
|
1403 | 1413 | {
|
— | — | @@ -1404,6 +1414,7 @@ |
1405 | 1415 | f = (float)_ttof(tmpstring);
|
1406 | 1416 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGDENSITY, *((LPDWORD)(&f)));
|
1407 | 1417 | }
|
| 1418 | + break;
|
1408 | 1419 | default:
|
1409 | 1420 | return FALSE;
|
1410 | 1421 | }
|
— | — | @@ -1495,9 +1506,23 @@ |
1496 | 1507 | SendDlgItemMessage(hWnd,IDC_MATAMBIENT,WM_SETTEXT,0,(LPARAM)_T("FFFFFFFF"));
|
1497 | 1508 | PopulateFogCombo(GetDlgItem(hWnd,IDC_VERTEXFOGMODE));
|
1498 | 1509 | PopulateFogCombo(GetDlgItem(hWnd,IDC_PIXELFOGMODE));
|
| 1510 | + SendDlgItemMessage(hWnd,IDC_VERTEXFOGMODE,CB_SETCURSEL,D3DFOG_NONE,0);
|
| 1511 | + SendDlgItemMessage(hWnd,IDC_PIXELFOGMODE,CB_SETCURSEL,D3DFOG_NONE,0);
|
1499 | 1512 | SendDlgItemMessage(hWnd,IDC_FOGSTART,WM_SETTEXT,0,(LPARAM)_T("0.0"));
|
1500 | 1513 | SendDlgItemMessage(hWnd,IDC_FOGEND,WM_SETTEXT,0,(LPARAM)_T("1.0"));
|
1501 | 1514 | SendDlgItemMessage(hWnd,IDC_FOGDENSITY,WM_SETTEXT,0,(LPARAM)_T("1.0"));
|
| 1515 | + SendDlgItemMessage(hWnd,IDC_FILLMODE,CB_ADDSTRING,0,(LPARAM)_T("Points"));
|
| 1516 | + SendDlgItemMessage(hWnd,IDC_FILLMODE,CB_ADDSTRING,0,(LPARAM)_T("Wireframe"));
|
| 1517 | + SendDlgItemMessage(hWnd,IDC_FILLMODE,CB_ADDSTRING,0,(LPARAM)_T("Solid"));
|
| 1518 | + SendDlgItemMessage(hWnd,IDC_FILLMODE,CB_SETCURSEL,2,0);
|
| 1519 | + SendDlgItemMessage(hWnd,IDC_SHADEMODE,CB_ADDSTRING,0,(LPARAM)_T("Flat"));
|
| 1520 | + SendDlgItemMessage(hWnd,IDC_SHADEMODE,CB_ADDSTRING,0,(LPARAM)_T("Gouraud"));
|
| 1521 | + SendDlgItemMessage(hWnd,IDC_SHADEMODE,CB_ADDSTRING,0,(LPARAM)_T("Phong"));
|
| 1522 | + SendDlgItemMessage(hWnd,IDC_SHADEMODE,CB_SETCURSEL,1,0);
|
| 1523 | + SendDlgItemMessage(hWnd,IDC_CULLMODE,CB_ADDSTRING,0,(LPARAM)_T("None"));
|
| 1524 | + SendDlgItemMessage(hWnd,IDC_CULLMODE,CB_ADDSTRING,0,(LPARAM)_T("CW"));
|
| 1525 | + SendDlgItemMessage(hWnd,IDC_CULLMODE,CB_ADDSTRING,0,(LPARAM)_T("CCW"));
|
| 1526 | + SendDlgItemMessage(hWnd,IDC_CULLMODE,CB_SETCURSEL,2,0);
|
1502 | 1527 | ::width = ddsd.dwWidth;
|
1503 | 1528 | ::height = ddsd.dwHeight;
|
1504 | 1529 | vertexshaderstate.texture = NULL;
|
— | — | @@ -1560,6 +1585,7 @@ |
1561 | 1586 | f = (float)_ttof(tmpstring);
|
1562 | 1587 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGSTART, *((LPDWORD)(&f)));
|
1563 | 1588 | }
|
| 1589 | + break;
|
1564 | 1590 | case IDC_FOGEND:
|
1565 | 1591 | if(HIWORD(wParam) == EN_CHANGE)
|
1566 | 1592 | {
|
— | — | @@ -1567,6 +1593,7 @@ |
1568 | 1594 | f = (float)_ttof(tmpstring);
|
1569 | 1595 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGEND, *((LPDWORD)(&f)));
|
1570 | 1596 | }
|
| 1597 | + break;
|
1571 | 1598 | case IDC_FOGDENSITY:
|
1572 | 1599 | if(HIWORD(wParam) == EN_CHANGE)
|
1573 | 1600 | {
|
— | — | @@ -1574,6 +1601,67 @@ |
1575 | 1602 | f = (float)_ttof(tmpstring);
|
1576 | 1603 | d3d7dev->SetRenderState(D3DRENDERSTATE_FOGDENSITY, *((LPDWORD)(&f)));
|
1577 | 1604 | }
|
| 1605 | + break;
|
| 1606 | + case IDC_FILLMODE:
|
| 1607 | + if(HIWORD(wParam) == CBN_SELCHANGE)
|
| 1608 | + {
|
| 1609 | + d3d7dev->SetRenderState(D3DRENDERSTATE_FILLMODE,SendDlgItemMessage(hWnd,
|
| 1610 | + IDC_FILLMODE,CB_GETCURSEL,0,0)+1);
|
| 1611 | + }
|
| 1612 | + break;
|
| 1613 | + case IDC_SHADEMODE:
|
| 1614 | + if(HIWORD(wParam) == CBN_SELCHANGE)
|
| 1615 | + {
|
| 1616 | + d3d7dev->SetRenderState(D3DRENDERSTATE_SHADEMODE,SendDlgItemMessage(hWnd,
|
| 1617 | + IDC_SHADEMODE,CB_GETCURSEL,0,0)+1);
|
| 1618 | + }
|
| 1619 | + break;
|
| 1620 | + case IDC_CULLMODE:
|
| 1621 | + if(HIWORD(wParam) == CBN_SELCHANGE)
|
| 1622 | + {
|
| 1623 | + d3d7dev->SetRenderState(D3DRENDERSTATE_CULLMODE,SendDlgItemMessage(hWnd,
|
| 1624 | + IDC_CULLMODE,CB_GETCURSEL,0,0)+1);
|
| 1625 | + }
|
| 1626 | + break;
|
| 1627 | + case IDC_DIFFUSE:
|
| 1628 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1629 | + {
|
| 1630 | + SendDlgItemMessage(hWnd,IDC_DIFFUSE,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1631 | + _stscanf(tmpstring,_T("%x"),&number);
|
| 1632 | + SetVertexColor(litvertices,24,number);
|
| 1633 | + }
|
| 1634 | + break;
|
| 1635 | + case IDC_SPECULAR:
|
| 1636 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1637 | + {
|
| 1638 | + SendDlgItemMessage(hWnd,IDC_SPECULAR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1639 | + _stscanf(tmpstring,_T("%x"),&number);
|
| 1640 | + SetVertexSpecular(litvertices,24,number);
|
| 1641 | + }
|
| 1642 | + break;
|
| 1643 | + case IDC_FACTOR:
|
| 1644 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1645 | + {
|
| 1646 | + SendDlgItemMessage(hWnd,IDC_FACTOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1647 | + _stscanf(tmpstring,_T("%x"),&number);
|
| 1648 | + d3d7dev->SetRenderState(D3DRENDERSTATE_TEXTUREFACTOR,number);
|
| 1649 | + }
|
| 1650 | + break;
|
| 1651 | + case IDC_FOGCOLOR:
|
| 1652 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1653 | + {
|
| 1654 | + SendDlgItemMessage(hWnd,IDC_FOGCOLOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1655 | + _stscanf(tmpstring,_T("%x"),&number);
|
| 1656 | + d3d7dev->SetRenderState(D3DRENDERSTATE_FOGCOLOR,number);
|
| 1657 | + }
|
| 1658 | + break;
|
| 1659 | + case IDC_BGCOLOR:
|
| 1660 | + if(HIWORD(wParam) == EN_CHANGE)
|
| 1661 | + {
|
| 1662 | + SendDlgItemMessage(hWnd,IDC_BGCOLOR,WM_GETTEXT,MAX_PATH,(LPARAM)tmpstring);
|
| 1663 | + _stscanf(tmpstring,_T("%x"),&bgcolor);
|
| 1664 | + }
|
| 1665 | + break;
|
1578 | 1666 | default:
|
1579 | 1667 | return FALSE;
|
1580 | 1668 | }
|
Index: dxgltest/dxgltest.rc |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |