light/modules/renderer/public/render_command.hpp
light7734 cd886aa8c9
Some checks reported errors
continuous-integration/drone/push Build was killed
refactor: flatten directory structure
2025-07-20 04:46:15 +03:30

44 lines
842 B
C++

#pragma once
#include <math/vec4.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 math::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