Successful DirectX context through GLFW, praise Gaben!

This commit is contained in:
2015-10-12 14:31:48 +02:00
parent 16ecdb76d3
commit a782e6b40a
16 changed files with 564 additions and 6 deletions
+13
View File
@@ -0,0 +1,13 @@
#include "PrecompiledHeader.h"
#include "Rendering/Model.h"
dd::Model::Model(std::string fileName)
: dd::RawModel(fileName)
{
D3D11_BUFFER_DESC vbd = { 0 };
vbd.ByteWidth = sizeof(RawModel::Vertex) * m_Vertices.size();
vbd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
D3D11_SUBRESOURCE_DATA vsrd = { m_Vertices.data(), 0, 0 };
StaticSystem::Get<Renderer>()->m_Device->CreateBuffer(&vbd, &vsrd, &VertexBuffer);
}