light/modules/renderer/include/renderer/render_command.hpp
light7734 f2c692a118
All checks were successful
continuous-integration/drone/push Build is passing
style: apply clang-format v20
2025-07-11 14:05:59 +03:30

45 lines
840 B
C++

#pragma once
#include <glm/glm.hpp>
struct GLFWwindow;
namespace lt {
class SharedContext;
class RenderCommand
{
public:
static auto create(GLFWwindow *windowHandle, const Ref<SharedContext> &sharedContext)
-> Scope<RenderCommand>;
RenderCommand(const RenderCommand &) = delete;
auto operator=(const RenderCommand &) -> RenderCommand & = delete;
virtual ~RenderCommand() = default;
virtual void swap_buffers() = 0;
virtual void clear_back_buffer(const glm::vec4 &clearColor) = 0;
virtual void draw(unsigned int count) = 0;
virtual void draw_indexed(unsigned int count) = 0;
virtual void default_target_framebuffer() = 0;
virtual void set_viewport(
unsigned int x,
unsigned int y,
unsigned int width,
unsigned int height
) = 0;
protected:
RenderCommand() = default;
};
} // namespace lt