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

33 lines
689 B
C
Raw Normal View History

2021-06-02 17:20:15 +04:30
#pragma once
#include "Base.h"
#include "Graphics/Shader.h"
#include <d3d11.h>
#include <wrl.h>
namespace Light {
class dxSharedContext;
2021-06-02 17:20:15 +04:30
class dxShader : public Shader
{
private:
std::shared_ptr<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;
public:
dxShader(const std::string& vertexSource, const std::string& pixelSource, std::shared_ptr<dxSharedContext> sharedContext);
2021-06-02 17:20:15 +04:30
~dxShader();
void Bind() override;
void UnBind() override;
Microsoft::WRL::ComPtr<ID3DBlob> GetVertexBlob() { return m_VertexBlob; }
};
}