diffuse light
This commit is contained in:
@@ -94,33 +94,22 @@ bool ModelClass::InitializeBuffers(ID3D11Device* device)
|
||||
indices = new unsigned long[m_indexCount];
|
||||
|
||||
// Load the vertex array with data.
|
||||
// Triangle 1
|
||||
vertices[0].position = XMFLOAT3(-1.0f, -1.0f, 0.0f); // Bottom Left.
|
||||
vertices[0].position = XMFLOAT3(-1.0f, -1.0f, 0.0f); // Bottom left.
|
||||
vertices[0].texture = XMFLOAT2(0.0f, 1.0f);
|
||||
vertices[0].normal = XMFLOAT3(0.0f, 0.0f, -1.0f);
|
||||
|
||||
vertices[1].position = XMFLOAT3(1.0f, 1.0f, 0.0f); // Top Right.
|
||||
vertices[1].texture = XMFLOAT2(1.0f, 0.0f);
|
||||
vertices[1].position = XMFLOAT3(0.0f, 1.0f, 0.0f); // Top middle.
|
||||
vertices[1].texture = XMFLOAT2(0.5f, 0.0f);
|
||||
vertices[1].normal = XMFLOAT3(0.0f, 0.0f, -1.0f);
|
||||
|
||||
vertices[2].position = XMFLOAT3(1.0f, -1.0f, 0.0f); // Bottom Right.
|
||||
vertices[2].position = XMFLOAT3(1.0f, -1.0f, 0.0f); // Bottom right.
|
||||
vertices[2].texture = XMFLOAT2(1.0f, 1.0f);
|
||||
|
||||
// Triangle 2
|
||||
vertices[3].position = XMFLOAT3(-1.0f, 1.0f, 0.0f); // Top Left.
|
||||
vertices[3].texture = XMFLOAT2(0.0f, 0.0f);
|
||||
|
||||
vertices[4].position = XMFLOAT3(1.0f, 1.0f, 0.0f); // Top Right.
|
||||
vertices[4].texture = XMFLOAT2(1.0f, 0.0f);
|
||||
|
||||
vertices[5].position = XMFLOAT3(-1.0f, -1.0f, 0.0f); // Bottom Left.
|
||||
vertices[5].texture = XMFLOAT2(0.0f, 1.0f);
|
||||
vertices[2].normal = XMFLOAT3(0.0f, 0.0f, -1.0f);
|
||||
|
||||
// Load the index array with data.
|
||||
indices[0] = 0; // Bottom left.
|
||||
indices[1] = 1; // Top middle.
|
||||
indices[2] = 2; // Bottom right.
|
||||
indices[3] = 3; // Top left.
|
||||
indices[4] = 4; // Top right.
|
||||
indices[5] = 5; // Bottom left.
|
||||
|
||||
// Set up the description of the static vertex buffer.
|
||||
vertexBufferDesc.Usage = D3D11_USAGE_DEFAULT;
|
||||
|
||||
Reference in New Issue
Block a user