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

34 lines
709 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
#include "Base/Base.hpp"
#include "Graphics/Shader.hpp"
#include "Utility/FileManager.hpp"
#include <d3d11.h>
#include <wrl.h>
namespace Light {
class dxSharedContext;
class dxShader: public Shader
{
private:
Ref<dxSharedContext> m_Context;
Microsoft::WRL::ComPtr<ID3D11VertexShader> m_VertexShader;
Microsoft::WRL::ComPtr<ID3D11PixelShader> m_PixelShader;
Microsoft::WRL::ComPtr<ID3DBlob> m_VertexBlob;
public:
dxShader(BasicFileHandle vertexFile, BasicFileHandle pixelFile, Ref<dxSharedContext> sharedContext);
~dxShader();
void Bind() override;
void UnBind() override;
inline Microsoft::WRL::ComPtr<ID3DBlob> GetVertexBlob() { return m_VertexBlob; }
};
} // namespace Light