mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-03-04 04:56:36 +00:00
adding clear window
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/31 15:14:50 by maldavid #+# #+# */
|
||||
/* Updated: 2023/04/01 15:32:23 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/04/01 17:30:54 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -53,6 +53,14 @@ namespace mlx
|
||||
*reinterpret_cast<uint32_t*>(mem) = color;
|
||||
}
|
||||
|
||||
void PixelPutPipeline::clear()
|
||||
{
|
||||
if(!_impl->buffer.isMapped())
|
||||
_impl->buffer.mapMem(&_impl->map);
|
||||
unsigned char* mem = static_cast<unsigned char*>(_impl->map);
|
||||
std::memset(mem, 0, sizeof(uint32_t) * (_impl->width * _impl->height));
|
||||
}
|
||||
|
||||
void PixelPutPipeline::present() noexcept
|
||||
{
|
||||
if(_impl->buffer.isMapped())
|
||||
|
||||
Reference in New Issue
Block a user