add input
add time add vertex color
This commit is contained in:
@@ -38,6 +38,7 @@ int WINAPI WinMain(
|
||||
|
||||
// set render states
|
||||
d3d.getDevice()->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);
|
||||
d3d.getDevice()->SetRenderState(D3DRS_LIGHTING, FALSE);
|
||||
|
||||
// 3. create a mesh
|
||||
Mesh mesh = {};
|
||||
@@ -67,6 +68,13 @@ int WINAPI WinMain(
|
||||
// 8. run application
|
||||
while (window.run())
|
||||
{
|
||||
if (GetAsyncKeyState(VK_F1) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
|
||||
if (GetAsyncKeyState(VK_F2) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
if (GetAsyncKeyState(VK_F3) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_FILLMODE, D3DFILL_POINT);
|
||||
if (GetAsyncKeyState(VK_F4) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
if (GetAsyncKeyState(VK_F5) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_CULLMODE, D3DCULL_CW);
|
||||
if (GetAsyncKeyState(VK_F6) & 0x8000) d3d.getDevice()->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);
|
||||
|
||||
// 8.1. update objects
|
||||
time.update();
|
||||
mesh.update(time.getDeltaTime());
|
||||
|
||||
Reference in New Issue
Block a user