2021-06-02 09:07:45 +04:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Base.h"
|
|
|
|
#include "Graphics/RenderCommand.h"
|
|
|
|
|
|
|
|
#include <d3d11.h>
|
|
|
|
#include <wrl.h>
|
|
|
|
|
|
|
|
namespace Light {
|
|
|
|
|
2021-06-19 15:12:42 +04:30
|
|
|
class dxSharedContext;
|
|
|
|
|
2021-06-02 09:07:45 +04:30
|
|
|
class dxRenderCommand : public RenderCommand
|
|
|
|
{
|
|
|
|
private:
|
2021-06-19 15:12:42 +04:30
|
|
|
std::shared_ptr<dxSharedContext> m_Context;
|
2021-06-02 09:07:45 +04:30
|
|
|
|
|
|
|
public:
|
2021-06-19 15:12:42 +04:30
|
|
|
dxRenderCommand(std::shared_ptr<dxSharedContext> sharedContext);
|
2021-06-02 09:07:45 +04:30
|
|
|
|
|
|
|
virtual void SwapBuffers() override;
|
2021-07-24 10:00:15 +04:30
|
|
|
virtual void ClearBackBuffer(const glm::vec4& clearColor) override;
|
2021-06-02 09:07:45 +04:30
|
|
|
|
|
|
|
virtual void Draw(unsigned int count) override;
|
|
|
|
virtual void DrawIndexed(unsigned int count) override;
|
2021-07-14 00:17:30 +04:30
|
|
|
|
2021-07-15 15:46:28 +04:30
|
|
|
virtual void DefaultTargetFramebuffer() override;
|
|
|
|
|
2021-07-14 00:17:30 +04:30
|
|
|
virtual void SetViewport(unsigned int x, unsigned int y, unsigned int width, unsigned int height) override;
|
2021-07-22 13:00:41 +04:30
|
|
|
|
|
|
|
private:
|
|
|
|
void SetResolution(unsigned int width, unsigned int height);
|
2021-06-02 09:07:45 +04:30
|
|
|
};
|
|
|
|
|
|
|
|
}
|