wl
This commit is contained in:
parent
b43765b2c7
commit
c864b0da32
3 changed files with 14 additions and 3 deletions
|
@ -2,7 +2,10 @@
|
|||
#include "Graphics.h"
|
||||
#include "UI.h"
|
||||
|
||||
#if BX_PLATFORM_LINUX && WL_EGL_PLATFORM
|
||||
#include <wayland-egl.h>
|
||||
#endif
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_timer.h>
|
||||
|
||||
|
@ -107,10 +110,11 @@ namespace K {
|
|||
const bgfx::Caps *caps = bgfx::getCaps();
|
||||
bgfx::dbgTextClear();
|
||||
bgfx::dbgTextPrintf(0, app_state.window_height/16 - 8, 0xf8,
|
||||
" lachrymal.net :: %s Renderer :: Max Views %u :: Max FBs %u :: Max Texture Samplers %u :: Blitting %s :: %u FPS",
|
||||
" lachrymal.net :: %s Renderer :: %u/%u Views :: %u FBs :: %u Samplers :: Blit %s :: %s :: %u FPS",
|
||||
caps->supported & BGFX_CAPS_RENDERER_MULTITHREADED ? "Multithreaded" : "Singlethreaded",
|
||||
caps->limits.maxViews, caps->limits.maxFrameBuffers,
|
||||
app_state.n_views, caps->limits.maxViews, caps->limits.maxFrameBuffers,
|
||||
caps->limits.maxTextureSamplers, caps->supported & BGFX_CAPS_TEXTURE_BLIT ? "OK" : "NO",
|
||||
SDL_GetCurrentVideoDriver(),
|
||||
stat->cpuTimerFreq / stat->cpuTimeFrame);
|
||||
bgfx::dbgTextPrintf(0, app_state.window_height/16 - 7, 0xf8,
|
||||
" Project Keishiki :: %s :: Build %s %s :: SDL %i.%i.%i :: bgfx 1.%i :: Dear ImGui %s :: %s",
|
||||
|
@ -147,7 +151,11 @@ namespace K {
|
|||
K::UI::Shutdown(state);
|
||||
K::Resource::Shutdown();
|
||||
bgfx::shutdown();
|
||||
SDL_DestroyWindow(app_state.window);
|
||||
|
||||
#if !(BX_PLATFORM_LINUX && WL_EGL_PLATFORM)
|
||||
SDL_DestroyWindow(app_state.window);
|
||||
#endif
|
||||
|
||||
SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -401,6 +401,8 @@ namespace K::UI {
|
|||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
app_state.n_views = Graphics::K_VIEW_COMP_COMPOSITE + view_count;
|
||||
|
||||
ImGui::SetNextItemWidth(50.0f);
|
||||
ImGui::DragFloat("FPS", &s.fps, 1.0f, 1.0f, 120.0f);
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace K {
|
|||
|
||||
u64 init_time{}, last_time{}, current_time{}, delta_t{};
|
||||
u32 bgfx_frame{};
|
||||
u32 n_views{};
|
||||
std::atomic_bool running {true};
|
||||
} app_state; // global !
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue