adding possible new feature

This commit is contained in:
Kbz-8
2023-12-22 23:21:24 +01:00
parent bf6389f9a7
commit 064f660852
12 changed files with 118 additions and 62 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/31 18:03:35 by maldavid #+# #+# */
/* Updated: 2023/12/10 22:46:08 by kbz_8 ### ########.fr */
/* Updated: 2023/12/22 23:07:44 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -31,7 +31,7 @@ namespace mlx
{
void Texture::create(uint8_t* pixels, uint32_t width, uint32_t height, VkFormat format, const char* name, bool dedicated_memory)
{
Image::create(width, height, format, TILING, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, name, dedicated_memory);
Image::create(width, height, format, TILING, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, name, dedicated_memory);
Image::createImageView(VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT);
Image::createSampler();

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/25 11:54:21 by maldavid #+# #+# */
/* Updated: 2023/12/15 21:44:30 by maldavid ### ########.fr */
/* Updated: 2023/12/22 23:02:54 by kbz_8 ### ########.fr */
/* */
/* ************************************************************************** */
@@ -53,6 +53,7 @@ namespace mlx
inline VkImageView getImageView() const noexcept { return _image_view; }
inline VkFormat getFormat() const noexcept { return _format; }
inline VkImageTiling getTiling() const noexcept { return _tiling; }
inline VkImageLayout getLayout() const noexcept { return _layout; }
inline VkSampler getSampler() const noexcept { return _sampler; }
inline uint32_t getWidth() const noexcept { return _width; }
inline uint32_t getHeight() const noexcept { return _height; }