2024-01-31 15:02:34 +08:00

22 lines
503 B
C++

#pragma once
#include "imgui.h"
#include <string>
#include "render_resource.h"
class texture : public render_resource
{
public:
texture(): width_(0), height_(0)
{
}
virtual bool init_data(const unsigned char* data, int width, int height) = 0;
[[nodiscard]] virtual bool is_valid() const = 0;
[[nodiscard]] int get_width() const override { return width_; }
[[nodiscard]] int get_height() const override { return height_; }
protected:
int width_;
int height_;
};