18 lines
436 B
C++
18 lines
436 B
C++
#pragma once
|
|
#include "imgui.h"
|
|
|
|
class render_resource : public std::enable_shared_from_this<render_resource> {
|
|
public:
|
|
virtual ~render_resource() = default;
|
|
|
|
virtual int get_width() const = 0;
|
|
|
|
virtual int get_height() const = 0;
|
|
|
|
virtual ImTextureID get_texture_id() = 0;
|
|
|
|
void draw() {
|
|
ImGui::Image(get_texture_id(), ImVec2(static_cast<float>(get_width()), static_cast<float>(get_height())));
|
|
}
|
|
};
|