Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graphite/engine/assets/include/texture.hpp

38 lines
615 B
C++
Raw Permalink Normal View History

2024-01-03 16:05:02 -05:00
#pragma once
#include <asset.hpp>
#include <utility.hpp>
class Texture : public Asset
{
public:
Texture(const std::string& path)
{
filepath = path;
}
void Load(Renderer* renderer) override;
void Unload(Renderer* renderer) override;
std::string GetName() override
{
return Utility::GetFilename(filepath);
}
std::string GetPath() override
{
return filepath;
}
std::type_index GetType() override
{
return typeid(Texture);
}
unsigned char* pixels;
int height, width, channels;
private:
std::string filepath;
};