fixing bug with window destruction within mlx_loop

This commit is contained in:
2024-04-21 18:14:14 +02:00
parent 54435be20d
commit 67d7635a32
3 changed files with 7 additions and 15 deletions

View File

@@ -29,12 +29,6 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
# Install system dependencies # Install system dependencies
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: 1.3.204.1
cache: true
- name: Install Dependancies - name: Install Dependancies
run: | run: |
brew install SDL2 brew install SDL2

View File

@@ -28,13 +28,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# Install system dependencies
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: 1.3.204.1
cache: true
# Force xmake to a specific folder (for cache) # Force xmake to a specific folder (for cache)
- name: Set xmake env - name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */ /* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */ /* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */
/* Updated: 2024/03/24 14:39:23 by maldavid ### ########.fr */ /* Updated: 2024/04/21 18:13:29 by maldavid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -50,13 +50,18 @@ namespace mlx::core
_loop_hook(_param); _loop_hook(_param);
for(auto& gs : _graphics) for(auto& gs : _graphics)
{
if(gs)
gs->render(); gs->render();
} }
}
Render_Core::get().getSingleTimeCmdManager().updateSingleTimesCmdBuffersSubmitState(); Render_Core::get().getSingleTimeCmdManager().updateSingleTimesCmdBuffersSubmitState();
for(auto& gs : _graphics) for(auto& gs : _graphics)
{ {
if(!gs)
continue;
for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) for(int i = 0; i < MAX_FRAMES_IN_FLIGHT; i++)
gs->getRenderer().getCmdBuffer(i).waitForExecution(); gs->getRenderer().getCmdBuffer(i).waitForExecution();
} }