Hi guys, im having some trouble with my rendering function. The following code produces the image i attachments. As you can see the Coordinates are really off for some reason i can't find out. If there's any more code you need, tell me. I'm gonna try and figure out things myself but please have a look and tell me if you spot anything cause i'm already sitting on this for a few hours and don't have a clue what's wrong.
void Graphics::RenderFrame(void) {
VERTEX OurVertices[] =
{
{0.0f, 0.5f, 0.0f, D3DXCOLOR(1.0f, 0.0f, 0.0f, 1.0f)},
{1.0f, -0.5f, 0.0f, D3DXCOLOR(0.0f, 1.0f, 0.0f, 1.0f)},
{-1.0f, -0.5f, 0.0f, D3DXCOLOR(0.0f, 0.0f, 1.0f, 1.0f)}
};
D3D11_BUFFER_DESC bd;
SecureZeroMemory(&bd, sizeof(bd));
bd.Usage = D3D11_USAGE_DYNAMIC;
bd.ByteWidth = sizeof(VERTEX) * 3;
bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
this->dev->CreateBuffer(&bd, NULL, &pVBuffer);
D3D11_MAPPED_SUBRESOURCE ms;
this->devcon->Map(this->pVBuffer, NULL, D3D11_MAP_WRITE_DISCARD, NULL, &ms);
memcpy(ms.pData, OurVertices, sizeof(OurVertices));
this->devcon->Unmap(this->pVBuffer, NULL);
this->devcon->ClearRenderTargetView(this->backbuffer, D3DXCOLOR(0.0f, 0.2f, 0.4f, 1.0f));
UINT stride = sizeof(VERTEX);
UINT offset = 0;
this->devcon->IASetVertexBuffers(0, 1, &this->pVBuffer, &stride, &offset);
this->devcon->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
this->devcon->Draw(3, 0);
this->swapchain->Present(0, 0);
}