light/Engine/src/Platform/GraphicsAPI/DirectX/dxShader.h

36 lines
702 B
C
Raw Normal View History

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"
#include "Utility/FileManager.h"
2021-06-02 17:20:15 +04:30
#include <d3d11.h>
#include <wrl.h>
namespace Light {
class dxSharedContext;
2021-06-02 17:20:15 +04:30
class dxShader : public Shader
{
private:
Ref<dxSharedContext> m_Context;
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-06-02 17:20:15 +04:30
public:
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
};
}