35 lines
854 B
C++
35 lines
854 B
C++
#pragma once
|
|
#include "rendering_common.h"
|
|
#include <Eigen/Eigen>
|
|
#include <cstdint>
|
|
|
|
namespace mirage {
|
|
|
|
template<typename ElementType>
|
|
struct draw_element {
|
|
virtual ~draw_element() = default;
|
|
|
|
static uint64_t batch_id() {
|
|
static uint32_t id = 0;
|
|
return reinterpret_cast<uint64_t>(&id);
|
|
}
|
|
|
|
virtual void submit(LLGL::CommandBuffer& in_command_buffer) = 0;
|
|
};
|
|
|
|
struct rounded_rect : draw_element<rounded_rect> {
|
|
struct param {
|
|
Eigen::Matrix4f projection_matrix;
|
|
rect rect;
|
|
float left_top_radius;
|
|
float right_top_radius;
|
|
float right_bottom_radius;
|
|
float left_bottom_radius;
|
|
};
|
|
|
|
virtual void submit(LLGL::CommandBuffer& in_command_buffer) override {
|
|
}
|
|
param data;
|
|
};
|
|
}
|