fixing rendering issues

This commit is contained in:
Kbz-8
2023-11-14 07:07:43 +01:00
parent d29cd56044
commit ad60a17da9
25 changed files with 171 additions and 117 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */
/* Updated: 2023/11/10 09:06:44 by maldavid ### ########.fr */
/* Updated: 2023/11/14 03:20:40 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -44,7 +44,7 @@ namespace mlx::core
void* Application::newTexture(int w, int h)
{
_textures.emplace_front().create(nullptr, w, h, VK_FORMAT_R8G8B8A8_UNORM);
_textures.emplace_front().create(nullptr, w, h, VK_FORMAT_R8G8B8A8_UNORM, "__mlx_unamed_user_texture");
return &_textures.front();
}

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/02 15:13:55 by maldavid #+# #+# */
/* Updated: 2023/11/08 21:02:22 by maldavid ### ########.fr */
/* Updated: 2023/11/14 06:59:12 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -54,11 +54,21 @@ namespace mlx
sets[1] = _text_put_pipeline->getDescriptorSet();
vkCmdBindDescriptorSets(cmd_buff, VK_PIPELINE_BIND_POINT_GRAPHICS, _renderer->getPipeline().getPipelineLayout(), 0, sets.size(), sets.data(), 0, nullptr);
_text_put_pipeline->render();
_renderer->endFrame();
for(auto& data : _textures_to_render)
data.texture->resetUpdate();
#ifdef GRAPHICS_MEMORY_DUMP
// dump memory to file every two seconds
static uint64_t timer = SDL_GetTicks64();
if(SDL_GetTicks64() - timer > 2000)
{
Render_Core::get().getAllocator().dumpMemoryToJson();
timer += 2000;
}
#endif
}
GraphicsSupport::~GraphicsSupport()