Support exiting GPU Test

This commit is contained in:
2024-01-03 22:44:13 -06:00
parent 21efede7cb
commit 376cf02697
5 changed files with 80 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
#include "../../../include/shared.hpp"
#include "include/gpu_test_assets.hpp"
#include <PSX/GPU/gpu.hpp>
#include <PSX/GPU/make_gpu_primitives.hpp>
#include <PSX/Periphery/periphery.hpp>
#include <stdio.h>
namespace GPUTest {
@@ -118,8 +120,17 @@ namespace GPUTest {
void main() {
rect9.concat(rect10);
Shared::back_menu.reset();
while(true) {
// Update Phase
Periphery::query_controller();
if(Shared::back_menu.update(Make::PositionI16(0, GPU::Display::Height - 32))) {
break;
}
GPU::swap_buffers_vsync(2);
GPU::render(triangle1);
GPU::render(triangle2);
GPU::render(triangle3);
@@ -147,8 +158,7 @@ namespace GPUTest {
GPU::render(line4);
GPU::render(rect9);
GPU::swap_buffers_vsync(2);
Shared::back_menu.render();
}
}
}