removing texture library

This commit is contained in:
2023-04-21 22:17:55 +02:00
parent f6736f210a
commit 6d3421d7f4
21 changed files with 162 additions and 290 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/08 02:24:58 by maldavid #+# #+# */
/* Updated: 2023/04/07 16:39:35 by maldavid ### ########.fr */
/* Updated: 2023/04/21 19:05:34 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -34,6 +34,7 @@ namespace mlx
void destroy() noexcept override;
void* openCPUmap();
inline void* getMap() const noexcept { return _cpu_map_adress; }
inline void setDescriptor(DescriptorSet set) noexcept { _set = std::move(set); }
inline VkDescriptorSet getSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; }
@@ -56,11 +57,11 @@ namespace mlx
struct TextureRenderData
{
std::shared_ptr<Texture> texture;
Texture* texture;
int x;
int y;
TextureRenderData(std::shared_ptr<Texture> _texture, int _x, int _y) : texture(_texture), x(_x), y(_y) {}
TextureRenderData(Texture* _texture, int _x, int _y) : texture(_texture), x(_x), y(_y) {}
bool operator==(const TextureRenderData& rhs) const { return texture == rhs.texture && x == rhs.x && y == rhs.y; }
};
}
@@ -72,7 +73,7 @@ namespace std
{
size_t operator()(const mlx::TextureRenderData& td) const noexcept
{
return std::hash<std::shared_ptr<mlx::Texture>>()(td.texture) + std::hash<int>()(td.x) + std::hash<int>()(td.y);
return std::hash<mlx::Texture*>()(td.texture) + std::hash<int>()(td.x) + std::hash<int>()(td.y);
}
};
}