2021-06-02 17:20:15 +04:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Base.h"
|
|
|
|
#include "Graphics/VertexLayout.h"
|
|
|
|
|
|
|
|
#include <d3d11.h>
|
|
|
|
#include <wrl.h>
|
|
|
|
|
|
|
|
namespace Light {
|
|
|
|
|
|
|
|
class Shader;
|
2021-06-19 15:12:42 +04:30
|
|
|
class dxSharedContext;
|
2021-06-02 17:20:15 +04:30
|
|
|
|
|
|
|
class dxVertexLayout : public VertexLayout
|
|
|
|
{
|
|
|
|
private:
|
2021-06-19 15:12:42 +04:30
|
|
|
std::shared_ptr<dxSharedContext> m_Context;
|
2021-06-02 17:20:15 +04:30
|
|
|
|
2021-06-19 15:12:42 +04:30
|
|
|
Microsoft::WRL::ComPtr<ID3D11InputLayout> m_InputLayout;
|
2021-06-02 17:20:15 +04:30
|
|
|
|
|
|
|
public:
|
2021-07-01 19:25:46 +04:30
|
|
|
dxVertexLayout(std::shared_ptr<Shader> shader, const std::vector<std::pair<std::string, VertexElementType>>& elements, std::shared_ptr<dxSharedContext> sharedContext);
|
2021-06-02 17:20:15 +04:30
|
|
|
~dxVertexLayout();
|
|
|
|
|
|
|
|
void Bind() override;
|
|
|
|
void UnBind() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DXGI_FORMAT GetDxgiFormat(VertexElementType type);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|