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

42 lines
676 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
#include <d3d11.h>
#include <renderer/shader.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 dxSharedContext;
class dxShader: public Shader
{
public:
2025-07-05 13:28:41 +03:30
dxShader(
2025-07-05 16:07:51 +03:30
BasicFileHandle vertexFile,
BasicFileHandle pixelFile,
2025-07-05 13:28:41 +03:30
Ref<dxSharedContext> sharedContext
);
2025-07-05 16:07:51 +03:30
2022-03-08 21:19:19 +03:30
~dxShader();
void bind() override;
2025-07-05 16:07:51 +03:30
void un_bind() override;
2022-03-08 21:19:19 +03:30
2025-07-06 14:02:50 +03:30
auto get_vertex_blob() -> Microsoft::WRL::ComPtr<ID3DBlob>
2025-07-05 13:28:41 +03:30
{
return m_vertex_blob;
2025-07-05 13:28:41 +03:30
}
2025-07-05 16:07:51 +03:30
private:
Ref<dxSharedContext> m_context;
Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertex_shader;
Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixel_shader;
Microsoft::WRL::ComPtr<ID3DBlob> m_vertex_blob;
2022-03-08 21:19:19 +03:30
};
2025-07-11 00:05:48 +03:30
} // namespace lt