mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 15:13:34 +00:00
working pixel put pipeline
This commit is contained in:
@@ -6,15 +6,13 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/31 13:18:50 by maldavid #+# #+# */
|
||||
/* Updated: 2023/03/31 20:30:25 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/01 12:10:33 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_PIXEL_PUT__
|
||||
#define __MLX_PIXEL_PUT__
|
||||
|
||||
#include <renderer/buffers/vk_buffer.h>
|
||||
#include <renderer/images/vk_image.h>
|
||||
#include <renderer/descriptors/vk_descriptor_set.h>
|
||||
|
||||
namespace mlx
|
||||
@@ -22,25 +20,22 @@ namespace mlx
|
||||
class PixelPutPipeline
|
||||
{
|
||||
public:
|
||||
PixelPutPipeline() = default;
|
||||
PixelPutPipeline();
|
||||
|
||||
void init(uint32_t width, uint32_t height, class Renderer& renderer) noexcept;
|
||||
|
||||
void setPixel(uint32_t x, uint32_t y, int color) noexcept;
|
||||
void present() noexcept;
|
||||
inline VkDescriptorSet& getDescriptorSet() noexcept { return _image_set.get(); }
|
||||
void render(class Renderer& renderer) noexcept;
|
||||
VkDescriptorSet& getDescriptorSet() noexcept;
|
||||
|
||||
void destroy() noexcept;
|
||||
|
||||
~PixelPutPipeline() = default;
|
||||
~PixelPutPipeline();
|
||||
|
||||
private:
|
||||
Image _image;
|
||||
Buffer _buffer;
|
||||
DescriptorSet _image_set;
|
||||
void* _map = nullptr;
|
||||
uint32_t _width = 0;
|
||||
uint32_t _height = 0;
|
||||
struct _Pimpl;
|
||||
std::unique_ptr<_Pimpl> _impl;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user