engine/include/resources/texture.hpp

34 lines
724 B
C++
Raw Normal View History

2022-12-15 15:54:11 +00:00
#pragma once
#include "gfx_device.hpp"
#include <string>
2022-12-15 15:54:11 +00:00
namespace engine::resources {
class Texture {
public:
2023-01-26 21:17:07 +00:00
enum class Filtering {
OFF,
BILINEAR,
TRILINEAR,
ANISOTROPIC,
};
2023-03-23 19:07:10 +00:00
Texture(GFXDevice* gfxDevice, const gfx::DescriptorSetLayout* materialSetLayout, const gfx::Sampler* sampler, const std::string& path, Filtering filtering, bool useMipmaps, bool useLinearMagFilter);
2022-12-15 15:54:11 +00:00
~Texture();
Texture(const Texture&) = delete;
Texture& operator=(const Texture&) = delete;
2023-03-23 19:07:10 +00:00
const gfx::Image* getImage() { return m_image; }
const gfx::DescriptorSet* getDescriptorSet() { return m_descriptorSet; }
2022-12-15 15:54:11 +00:00
private:
GFXDevice* m_gfxDevice;
2023-03-23 19:07:10 +00:00
const gfx::Image* m_image;
const gfx::DescriptorSet* m_descriptorSet;
2022-12-15 15:54:11 +00:00
};
}