add light

This commit is contained in:
2025-11-19 13:50:33 +01:00
parent 4910894bef
commit 770c3f790b
6 changed files with 49 additions and 13 deletions
+5 -4
View File
@@ -123,10 +123,11 @@ UINT Mesh::createVertexBuffer(IDirect3DDevice9* pD3DDevice)
//// quad with trianglefan
//// quad with trianglelist & index buffer
pVertices[0] = Vertex(-0.5f, 0.5f, 0.0f, 0.0f, 0.0f);
pVertices[1] = Vertex(0.5f, 0.5f, 0.0f, 1.0f, 0.0f);
pVertices[2] = Vertex(0.5f, -0.5f, 0.0f, 1.0f, 1.0f);
pVertices[3] = Vertex(-0.5f, -0.5f, 0.0f, 0.0f, 1.0f);
// uv & normal
pVertices[0] = Vertex(-0.5f, 0.5f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f);
pVertices[1] = Vertex(0.5f, 0.5f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f);
pVertices[2] = Vertex(0.5f, -0.5f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f);
pVertices[3] = Vertex(-0.5f, -0.5f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f);
//// cube with color
//// front