light/modules/renderer/public/gl/render_command.hpp

37 lines
636 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
#include <math/vec4.hpp>
#include <renderer/render_command.hpp>
2022-03-08 21:19:19 +03:30
struct GLFWwindow;
2025-07-11 00:05:48 +03:30
namespace lt {
2022-03-08 21:19:19 +03:30
class glRenderCommand: public RenderCommand
{
public:
2025-07-05 13:28:41 +03:30
glRenderCommand(GLFWwindow *windowHandle);
2022-03-08 21:19:19 +03:30
void swap_buffers() override;
2025-07-05 16:07:51 +03:30
void clear_back_buffer(const math::vec4 &clearColor) override;
2022-03-08 21:19:19 +03:30
void draw(unsigned int count) override;
2025-07-05 16:07:51 +03:30
void draw_indexed(unsigned int count) override;
2022-03-08 21:19:19 +03:30
void default_target_framebuffer() override;
2022-03-08 21:19:19 +03:30
2025-07-11 14:05:59 +03:30
void set_viewport(
unsigned int x,
unsigned int y,
unsigned int width,
unsigned int height
) override;
2025-07-05 16:07:51 +03:30
private:
GLFWwindow *m_window_handle;
2022-03-08 21:19:19 +03:30
};
2025-07-11 00:05:48 +03:30
} // namespace lt