add vertex color

add time calculation
This commit is contained in:
2025-11-12 13:49:37 +01:00
parent 589d0933f4
commit 6470789977
3 changed files with 15 additions and 11 deletions
+8 -8
View File
@@ -130,16 +130,16 @@ UINT Mesh::createVertexBuffer(IDirect3DDevice9* pD3DDevice)
// cube
// front
pVertices[0] = Vertex(-0.5f, 0.5f, -0.5f);
pVertices[1] = Vertex(0.5f, 0.5f, -0.5f);
pVertices[2] = Vertex(0.5f, -0.5f, -0.5f);
pVertices[3] = Vertex(-0.5f, -0.5f, -0.5f);
pVertices[0] = Vertex(-0.5f, 0.5f, -0.5f, 255, 0, 0);
pVertices[1] = Vertex(0.5f, 0.5f, -0.5f, 0, 255, 0);
pVertices[2] = Vertex(0.5f, -0.5f, -0.5f, 0, 0, 255);
pVertices[3] = Vertex(-0.5f, -0.5f, -0.5f, 255, 0, 255);
// back
pVertices[4] = Vertex(0.5f, 0.5f, 0.5f);
pVertices[5] = Vertex(-0.5f, 0.5f, 0.5f);
pVertices[6] = Vertex(-0.5f, -0.5f, 0.5f);
pVertices[7] = Vertex(0.5f, -0.5f, 0.5f);
pVertices[4] = Vertex(0.5f, 0.5f, 0.5f, 255, 255, 0);
pVertices[5] = Vertex(-0.5f, 0.5f, 0.5f, 0, 255, 255);
pVertices[6] = Vertex(-0.5f, -0.5f, 0.5f, 0, 0, 0);
pVertices[7] = Vertex(0.5f, -0.5f, 0.5f, 200, 200, 200);
hr = _pVertexBuffer->Unlock();
CheckFailed(hr, 320);