2021-06-02 17:20:15 +04:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Graphics/Shader.h"
|
|
|
|
|
2021-07-29 17:12:13 +04:30
|
|
|
#include "Base/Base.h"
|
2021-07-05 01:59:18 +04:30
|
|
|
|
2021-10-02 08:51:54 +03:30
|
|
|
#include "Utility/FileManager.h"
|
|
|
|
|
2021-06-02 17:20:15 +04:30
|
|
|
#include <d3d11.h>
|
|
|
|
#include <wrl.h>
|
|
|
|
|
|
|
|
namespace Light {
|
|
|
|
|
2021-06-19 15:12:42 +04:30
|
|
|
class dxSharedContext;
|
|
|
|
|
2021-06-02 17:20:15 +04:30
|
|
|
class dxShader : public Shader
|
|
|
|
{
|
|
|
|
private:
|
2021-07-26 11:43:37 +04:30
|
|
|
Ref<dxSharedContext> m_Context;
|
2021-06-19 15:12:42 +04:30
|
|
|
|
2021-06-02 17:20:15 +04:30
|
|
|
Microsoft::WRL::ComPtr<ID3D11VertexShader> m_VertexShader;
|
|
|
|
Microsoft::WRL::ComPtr<ID3D11PixelShader> m_PixelShader;
|
|
|
|
|
|
|
|
Microsoft::WRL::ComPtr<ID3DBlob> m_VertexBlob;
|
2021-07-01 19:25:46 +04:30
|
|
|
|
2021-06-02 17:20:15 +04:30
|
|
|
public:
|
2021-10-02 08:51:54 +03:30
|
|
|
dxShader(BasicFileHandle vertexFile, BasicFileHandle pixelFile, Ref<dxSharedContext> sharedContext);
|
2021-06-02 17:20:15 +04:30
|
|
|
~dxShader();
|
|
|
|
|
|
|
|
void Bind() override;
|
|
|
|
void UnBind() override;
|
|
|
|
|
2021-07-29 17:12:13 +04:30
|
|
|
inline Microsoft::WRL::ComPtr<ID3DBlob> GetVertexBlob() { return m_VertexBlob; }
|
2021-06-02 17:20:15 +04:30
|
|
|
};
|
|
|
|
|
|
|
|
}
|