2023-05-01 12:55:49 +00:00
|
|
|
#ifndef ENGINE_INCLUDE_RESOURCES_TEXTURE_H_
|
|
|
|
#define ENGINE_INCLUDE_RESOURCES_TEXTURE_H_
|
2022-12-15 15:54:11 +00:00
|
|
|
|
2023-01-08 15:22:44 +00:00
|
|
|
#include <string>
|
|
|
|
|
2023-05-01 13:13:35 +00:00
|
|
|
#include "application.h"
|
|
|
|
#include "gfx_device.h"
|
2023-03-31 08:08:49 +00:00
|
|
|
|
2023-05-01 12:55:49 +00:00
|
|
|
namespace engine {
|
|
|
|
namespace resources {
|
2022-12-15 15:54:11 +00:00
|
|
|
|
|
|
|
class Texture {
|
2023-05-01 12:55:49 +00:00
|
|
|
public:
|
|
|
|
enum class Filtering {
|
|
|
|
kOff,
|
|
|
|
kBilinear,
|
|
|
|
kTrilinear,
|
|
|
|
kAnisotropic,
|
|
|
|
};
|
|
|
|
|
|
|
|
Texture(RenderData* render_data, const std::string& path,
|
|
|
|
Filtering filtering);
|
|
|
|
~Texture();
|
|
|
|
Texture(const Texture&) = delete;
|
|
|
|
Texture& operator=(const Texture&) = delete;
|
|
|
|
|
|
|
|
const gfx::Image* GetImage() { return image_; }
|
|
|
|
const gfx::DescriptorSet* GetDescriptorSet() { return descriptor_set_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
GFXDevice* gfx_;
|
|
|
|
const gfx::Image* image_;
|
|
|
|
const gfx::DescriptorSet* descriptor_set_;
|
2022-12-15 15:54:11 +00:00
|
|
|
};
|
|
|
|
|
2023-05-01 12:55:49 +00:00
|
|
|
} // namespace resources
|
|
|
|
} // namespace engine
|
|
|
|
|
|
|
|
#endif
|