- Added 'Camera' - Added 'SetuniformMat4' to the 'Shader' , this is a temporary solution - Added u_ViewProjection to glsl shaders - Fixed 'Application's' placeholder delta time - Fixed glfwKeyEvent returning KeyReleasedEvent on GLFW_REPEAT - Note: Camera is not supported for DirectX for the time being due to hlsl not supporting uniforms like glsl
37 lines
No EOL
795 B
C++
37 lines
No EOL
795 B
C++
#pragma once
|
|
|
|
#include "Base.h"
|
|
#include "Graphics/Shader.h"
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include <d3d11.h>
|
|
#include <wrl.h>
|
|
|
|
namespace Light {
|
|
|
|
class dxSharedContext;
|
|
|
|
class dxShader : public Shader
|
|
{
|
|
private:
|
|
std::shared_ptr<dxSharedContext> m_Context;
|
|
|
|
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);
|
|
~dxShader();
|
|
|
|
void Bind() override;
|
|
void UnBind() override;
|
|
|
|
void SetUniformMat4(const std::string& name, const glm::mat4& value) override;
|
|
|
|
Microsoft::WRL::ComPtr<ID3DBlob> GetVertexBlob() { return m_VertexBlob; }
|
|
};
|
|
|
|
} |