mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 23:23:34 +00:00
adding profiler
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/02 15:13:55 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/27 21:27:48 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/10 18:23:26 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace mlx
|
||||
_height(h),
|
||||
_id(id)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_renderer->setWindow(nullptr);
|
||||
_renderer->init(render_target);
|
||||
_pixel_put_pipeline.init(w, h, *_renderer);
|
||||
@@ -36,6 +37,7 @@ namespace mlx
|
||||
_height(h),
|
||||
_id(id)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_renderer->setWindow(_window.get());
|
||||
_renderer->init(nullptr);
|
||||
_pixel_put_pipeline.init(w, h, *_renderer);
|
||||
@@ -44,6 +46,7 @@ namespace mlx
|
||||
|
||||
void GraphicsSupport::render() noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
if(!_renderer->beginFrame())
|
||||
return;
|
||||
_proj = glm::ortho<float>(0, _width, 0, _height);
|
||||
@@ -71,11 +74,12 @@ namespace mlx
|
||||
}
|
||||
|
||||
_pixel_put_pipeline.present();
|
||||
|
||||
sets[1] = _pixel_put_pipeline.getDescriptorSet();
|
||||
vkCmdBindDescriptorSets(cmd_buff, VK_PIPELINE_BIND_POINT_GRAPHICS, _renderer->getPipeline().getPipelineLayout(), 0, sets.size(), sets.data(), 0, nullptr);
|
||||
_pixel_put_pipeline.render(*_renderer);
|
||||
|
||||
_text_put_pipeline->render(sets);
|
||||
|
||||
_renderer->endFrame();
|
||||
|
||||
for(auto& data : _textures_to_render)
|
||||
@@ -94,6 +98,7 @@ namespace mlx
|
||||
|
||||
GraphicsSupport::~GraphicsSupport()
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
vkDeviceWaitIdle(Render_Core::get().getDevice().get());
|
||||
_text_put_pipeline->destroy();
|
||||
_pixel_put_pipeline.destroy();
|
||||
|
||||
Reference in New Issue
Block a user