light/modules/renderer/private/dx/vertex_layout.hpp

36 lines
610 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
#include <d3d11.h>
#include <renderer/vertex_layout.hpp>
2022-03-08 21:19:19 +03:30
#include <wrl.h>
2025-07-11 00:05:48 +03:30
namespace lt {
2022-03-08 21:19:19 +03:30
class Shader;
class dxSharedContext;
class dxVertexLayout: public VertexLayout
{
public:
2025-07-05 13:28:41 +03:30
dxVertexLayout(
Ref<Shader> shader,
const std::vector<std::pair<std::string, VertexElementType>> &elements,
Ref<dxSharedContext> sharedContext
);
2025-07-05 16:07:51 +03:30
2022-03-08 21:19:19 +03:30
~dxVertexLayout();
void bind() override;
2025-07-05 16:07:51 +03:30
void un_bind() override;
2022-03-08 21:19:19 +03:30
private:
DXGI_FORMAT get_dxgi_format(VertexElementType type);
2025-07-05 16:07:51 +03:30
Ref<dxSharedContext> m_context;
Microsoft::WRL::ComPtr<ID3D11InputLayout> m_input_layout;
2022-03-08 21:19:19 +03:30
};
2025-07-11 00:05:48 +03:30
} // namespace lt