engine/include/resources/texture.h

42 lines
897 B
C
Raw Permalink Normal View History

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
#include <string>
2023-05-01 13:13:35 +00:00
#include "application.h"
#include "gfx_device.h"
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,
};
2023-08-29 17:06:04 +00:00
Texture(Renderer* renderer, const std::string& path,
2023-05-01 12:55:49 +00:00
Filtering filtering);
2023-08-29 17:06:04 +00:00
Texture(Renderer* renderer, const uint8_t* bitmap, int width, int height,
2023-05-14 21:05:22 +00:00
Filtering filtering);
2023-05-01 12:55:49 +00:00
~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