summaryrefslogtreecommitdiff
path: root/engine/xe_image.hpp
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-09-28 09:38:25 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-09-28 09:38:25 -0400
commit9d0262e8a2cbc722e0ff01058994c4ead1dbe0e5 (patch)
treecb5bfceb20da5a9f4f11403c0dd91a1ad15908fd /engine/xe_image.hpp
parentset render distance back to 10 (diff)
downloadminecraftvulkan-9d0262e8a2cbc722e0ff01058994c4ead1dbe0e5.tar.gz
minecraftvulkan-9d0262e8a2cbc722e0ff01058994c4ead1dbe0e5.tar.bz2
minecraftvulkan-9d0262e8a2cbc722e0ff01058994c4ead1dbe0e5.zip
better model and texture cleanup
Diffstat (limited to 'engine/xe_image.hpp')
-rw-r--r--engine/xe_image.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/xe_image.hpp b/engine/xe_image.hpp
index bc1dad2..7884dd6 100644
--- a/engine/xe_image.hpp
+++ b/engine/xe_image.hpp
@@ -3,6 +3,7 @@
#include "xe_device.hpp"
#include <string>
+#include <set>
namespace xe {
@@ -10,7 +11,9 @@ class Image {
public:
- Image(const std::string &filename, bool anisotropic);
+ static Image* createImage(const std::string &filename, bool anisotropic);
+ static void deleteImage(Image* image);
+
~Image();
Image(const Image&) = delete;
@@ -18,6 +21,10 @@ class Image {
private:
+ static void submitDeleteQueue(bool purge);
+
+ Image(const std::string &filename, bool anisotropic);
+
void createTextureImage(const std::string &filename);
void transitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout);
void generateMipmaps(VkImage image, VkFormat imageFormat, int32_t texWidth, int32_t texHeight, uint32_t mipLevels);
@@ -38,6 +45,7 @@ class Image {
friend class RenderSystem;
friend class SwapChain;
+ friend class Engine;
};