Skip to content

Commit

Permalink
Update for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravbug committed Dec 30, 2023
1 parent ff5c8bc commit 0f30cac
Show file tree
Hide file tree
Showing 33 changed files with 60 additions and 62 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt-get update -y
sudo apt remove build-essential -y
sudo apt-get install cmake g++-12 fuse libfuse2 ninja-build vulkan-sdk libgl1-mesa-dev libgtk-3-dev libasound2-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libegl1-mesa-dev libvulkan-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev mesa-common-dev -y --no-install-recommends
sudo apt-get install cmake g++-13 fuse libfuse2 ninja-build vulkan-sdk libgl1-mesa-dev libgtk-3-dev libasound2-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libegl1-mesa-dev libvulkan-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev mesa-common-dev -y --no-install-recommends
- name: Configure
run: |
mkdir -p build
mkdir -p build/linux
cd build/linux
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DRAVENGINE_BUILD_TESTS=OFF ../..
- name: Build
run: cd build/linux && cmake --build . --config release --target install
Expand Down Expand Up @@ -64,15 +64,15 @@ jobs:
sudo apt-get update
continue-on-error: true
- name: Install Host Dependencies
run: sudo apt-get install cmake:amd64 fuse:amd64 libfuse2:amd64 ninja-build:amd64 libx11-dev:amd64 libgl1-mesa-dev gcc-12:amd64 g++-12:amd64 gcc-12-aarch64-linux-gnu:amd64 g++-12-aarch64-linux-gnu:amd64 -y --no-install-recommends
run: sudo apt-get install cmake:amd64 fuse:amd64 libfuse2:amd64 ninja-build:amd64 libx11-dev:amd64 libgl1-mesa-dev gcc-13:amd64 g++-13:amd64 gcc-13-aarch64-linux-gnu:amd64 g++-13-aarch64-linux-gnu:amd64 -y --no-install-recommends
- name: Install Target Dependencies
run: sudo apt-get install libgl1-mesa-dev:arm64 libasound2-dev:arm64 libx11-dev:arm64 libxext-dev:arm64 libxrender-dev:arm64 libxrandr-dev:arm64 libxtst-dev:arm64 libxt-dev:arm64 libegl1-mesa-dev:arm64 libx11-xcb-dev:arm64 libxcb-dri2-0-dev:arm64 libxcb-glx0-dev:arm64 libxcb-icccm4-dev:arm64 libxcb-keysyms1-dev:arm64 libxcb-randr0-dev:arm64 libxrandr-dev:arm64 libxxf86vm-dev:arm64 mesa-common-dev:arm64 -y --no-install-recommends
- name: Configure
run: |
mkdir -p build
mkdir -p build/linuxarm
cd build/linuxarm
CC=/usr/bin/aarch64-linux-gnu-gcc-12 CXX=/usr/bin/aarch64-linux-gnu-g++-12 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DRAVENGINE_BUILD_TESTS=OFF ../..
CC=/usr/bin/aarch64-linux-gnu-gcc-13 CXX=/usr/bin/aarch64-linux-gnu-g++-13 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DRAVENGINE_BUILD_TESTS=OFF ../..
- name: Build
run: cd build/linuxarm && cmake --build . --config release --target install
- name: Upload Artifacts
Expand Down
2 changes: 1 addition & 1 deletion RavEngine
2 changes: 1 addition & 1 deletion Samples/AirHockey/AirHockey_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AirHockey : public RavEngine::App {
AddWorld(RavEngine::New<MainMenu>());
}

void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
3 changes: 1 addition & 2 deletions Samples/AirHockey/GameWorld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <RavEngine/Tween.hpp>
#include <RavEngine/Light.hpp>
#include <RavEngine/InputManager.hpp>
#include <fmt/format.h>
#include "MainMenu.hpp"
#include <RavEngine/Debug.hpp>
#include <RavEngine/AudioRoom.hpp>
Expand Down Expand Up @@ -127,7 +126,7 @@ void GameWorld::Reset(){
zerovel(p1);
zerovel(p2);
zerovel(puck);
Scoreboard->SetInnerRML(StrFormat("Score: {} - {}", p1score, p2score).c_str());
Scoreboard->SetInnerRML(std::format("Score: {} - {}", p1score, p2score).c_str());

if (p1score >= numToWin){
Scoreboard->SetInnerRML("Player 1 Wins!");
Expand Down
4 changes: 2 additions & 2 deletions Samples/Animation/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class Game : public RavEngine::App{
void OnStartup(int argc, char** argv) final{
AddWorld(RavEngine::New<Level>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/Common/FPSSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct FPSSystem : public RavEngine::AutoCTTI {
auto doc = gui.GetDocument(document);
auto App = RavEngine::GetApp();
gui.EnqueueUIUpdate([=]{
doc->GetElementById(element)->SetInnerRML(RavEngine::StrFormat("TPS: {} <br /> FPS: {} ({} ms)",
doc->GetElementById(element)->SetInnerRML(std::format("TPS: {} <br /> FPS: {} ({} ms)",
std::round(App->CurrentTPS()),
std::round(App->GetRenderEngine().GetCurrentFPS()),
std::round(App->GetRenderEngine().GetLastFrameTime() / 1000)));
Expand Down
6 changes: 3 additions & 3 deletions Samples/Flags/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ struct Level : public World{
uint8_t flag_id = 0;
for(const auto& f : flagpole.flags){
auto opt = doc->CreateElement("option");
opt->SetAttribute("value", StrFormat("{}",flag_id++)); // when creating options, we must assign them a value, otherwise the change event on the selector doesn't trigger if the option is selected
opt->SetAttribute("value", std::format("{}",flag_id++)); // when creating options, we must assign them a value, otherwise the change event on the selector doesn't trigger if the option is selected
opt->SetInnerRML(f.name);
picker->AppendChild(std::move(opt));
}
Expand All @@ -169,9 +169,9 @@ struct FlagsApp : public App{
void OnStartup(int argc, char** argv) final {
AddWorld(RavEngine::New<Level>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/GUI/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ struct App : public RavEngine::App{

AddWorld(RavEngine::New<::World>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/GUI/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct SingleEntityMarker : public Queryable<SingleEntityMarker>{};
struct FPSSystem : public AutoCTTI {
void operator()(const SingleEntityMarker& s) const{
GetApp()->DispatchMainThread([](){
GetApp()->SetWindowTitle(StrFormat("RavEngine GUIKitchenSink | {} - {} TPS, {} FPS ({} ms)", GetApp()->GetRenderEngine().GetCurrentBackendName(), (int)GetApp()->CurrentTPS(), (int)GetApp()->GetRenderEngine().GetCurrentFPS(), (int)GetApp()->GetRenderEngine().GetLastFrameTime()).c_str());
GetApp()->SetWindowTitle(std::format("RavEngine GUIKitchenSink | {} - {} TPS, {} FPS ({} ms)", GetApp()->GetRenderEngine().GetCurrentBackendName(), (int)GetApp()->CurrentTPS(), (int)GetApp()->GetRenderEngine().GetCurrentFPS(), (int)GetApp()->GetRenderEngine().GetLastFrameTime()).c_str());
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Gravity/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ struct Level : public World{
struct GravityApp : public App{
void OnStartup(int argc, char** argv) final{
AddWorld(RavEngine::New<Level>());
SetWindowTitle(StrFormat("RavEngine {} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("RavEngine {} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Navigation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ struct NavApp : public App{
auto world = RavEngine::New<Level>();
AddWorld(world);

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}

void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Occlusion/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ struct Level : public RavEngine::World {
struct OcclusionApp : public RavEngine::App {
void OnStartup(int argc, char** argv) final {
AddWorld(RavEngine::New<Level>());
SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final {
void OnFatal(const std::string_view msg) final {
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_Draw/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using namespace std;

struct Performance_B : public RavEngine::App {
public:
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
private:
Expand All @@ -17,7 +17,7 @@ struct Performance_B : public RavEngine::App {
// load world
AddWorld(RavEngine::New<PerfB_World>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
};

Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Draw/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct MetricsSystem : public AutoCTTI {
auto doc = gui.GetDocument("main.rml");
auto elem = doc->GetElementById("diag");
gui.EnqueueUIUpdate([this,elem] {
elem->SetInnerRML(StrFormat(
elem->SetInnerRML(std::format(
"FPS: {} ({} ms) <br /> TPS: {} <br /> Num Entities: {}",
(int)GetApp()->GetRenderEngine().GetCurrentFPS(), (int)GetApp()->GetRenderEngine().GetLastFrameTime(),
(int)GetApp()->CurrentTPS(),
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_DrawAnimated/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Performance_C : public RavEngine::App{

AddWorld(RavEngine::New<PerfC_World>());

SetWindowTitle(StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
5 changes: 2 additions & 3 deletions Samples/Perf_DrawAnimated/PerfC_World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <RavEngine/InputManager.hpp>
#include <RavEngine/App.hpp>
#include <RavEngine/BuiltinMaterials.hpp>
#include <fmt/format.h>
#include <RavEngine/Debug.hpp>
#include <RavEngine/Utilities.hpp>
#include <RavEngine/RenderEngine.hpp>
Expand Down Expand Up @@ -75,7 +74,7 @@ PerfC_World::PerfC_World(){

Debug::Log("Loading {} textures", textures.size());
for(int i = 0; i < textures.size(); i++){
textures[i] = Texture::Manager::Get(StrFormat("tx{}.png",i+1));
textures[i] = Texture::Manager::Get(std::format("tx{}.png",i+1));
materialInstances[i] = RavEngine::New<PBRMaterialInstance>(Material::Manager::Get<PBRMaterial>());
materialInstances[i]->SetAlbedoTexture(textures[i]);
}
Expand Down Expand Up @@ -178,7 +177,7 @@ PerfC_World::PerfC_World(){

void PerfC_World::PostTick(float scale){
hud->EnqueueUIUpdate([this] {
fpslabel->SetInnerRML(StrFormat("TPS: {}, FPS: {} ({} ms)", (int)GetApp()->CurrentTPS(),(int)GetApp()->GetRenderEngine().GetCurrentFPS(), (int)GetApp()->GetRenderEngine().GetLastFrameTime()));
fpslabel->SetInnerRML(std::format("TPS: {}, FPS: {} ({} ms)", (int)GetApp()->CurrentTPS(),(int)GetApp()->GetRenderEngine().GetCurrentFPS(), (int)GetApp()->GetRenderEngine().GetLastFrameTime()));
});
}

Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_ECS/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using namespace std;
using namespace RavEngine;
struct Performance_A : public RavEngine::App {
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
private:
Expand All @@ -18,7 +18,7 @@ struct Performance_A : public RavEngine::App {
// load world
AddWorld(RavEngine::New<PerfA_World>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
};

Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_ECS/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct MetricsSystem : public AutoCTTI {
auto doc = gui.GetDocument("ui.rml");
auto elem = doc->GetElementById("diag");
gui.EnqueueUIUpdate([this,elem] {
elem->SetInnerRML(StrFormat(R"(<p>
elem->SetInnerRML(std::format(R"(<p>
FPS: {}({} ms) <br />
TPS : {} ({} ops/s) <br />
Entities : {} <br />
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_Lighting/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ struct LightingApp : public RavEngine::App {

AddWorld(RavEngine::New<Level>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Lighting/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Level::Level() {
i++;
}
world->GetComponent<GUIComponent>().EnqueueUIUpdate([=] {
document->GetElementById("readout")->SetInnerRML(StrFormat("Number of objects: {}", value));
document->GetElementById("readout")->SetInnerRML(std::format("Number of objects: {}", value));
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_Network/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ struct NetApp : public RavEngine::App {
Debug::Log("Started client on {}", PORT);
}

SetWindowTitle(StrFormat("{} {} | {}", APPNAME, networkManager.IsServer()? "Server" : "Client", GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} {} | {}", APPNAME, networkManager.IsServer()? "Server" : "Client", GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/Perf_Network/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void Level::ServerUpdateGUI()
auto textNode = doc->CreateElement("p");
auto button = doc->CreateElement("button");
button->SetInnerRML("Kick");
textNode->SetInnerRML(StrFormat("id = {}",con));
textNode->SetInnerRML(std::format("id = {}",con));

struct KickEventListener : public Rml::EventListener {
HSteamNetConnection con;
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_RigidBodies/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ struct App : public RavEngine::App{
App::GetRenderEngine().VideoSettings.vsync = false;
App::GetRenderEngine().SyncVideoSettings();

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Perf_RigidBodies/Level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ struct SpawnerSystem : public RavEngine::AutoCTTI{
}
if(totalLostTicks < maxLostTicks){
guic.EnqueueUIUpdate([=]{
gh->GetDocument("ui.rml")->GetElementById("readout")->SetInnerRML(StrFormat("{}/{} balls (dropped {})", total - count,total,totalLostTicks));
gh->GetDocument("ui.rml")->GetElementById("readout")->SetInnerRML(std::format("{}/{} balls (dropped {})", total - count,total,totalLostTicks));
});
}
else{
auto spawned = total - count;
guic.EnqueueUIUpdate([=]{
gh->GetDocument("ui.rml")->GetElementById("readout")->SetInnerRML(StrFormat("{}/{} balls (sustained &lt; 20fps, stopping)", spawned,total));
gh->GetDocument("ui.rml")->GetElementById("readout")->SetInnerRML(std::format("{}/{} balls (sustained &lt; 20fps, stopping)", spawned,total));
});
ownWorld->DispatchAsync([](){
Debug::Log("Ran dispatched fun");
Expand Down
4 changes: 2 additions & 2 deletions Samples/Playground/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class TestApp : public RavEngine::App{
//create a world
AddWorld(RavEngine::New<TestWorld>());

SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final{
void OnFatal(const std::string_view msg) final{
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
2 changes: 1 addition & 1 deletion Samples/Rendering/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace std;

struct RenderingApp : public RavEngine::App {
void OnStartup(int argc, char** argv) final;
void OnFatal(const char* msg) final {
void OnFatal(const std::string_view msg) final {
RavEngine::Dialog::ShowBasic("Fatal Error", msg, Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/SceneViewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct SceneViewerApp : public RavEngine::App {

NFD::UniquePathU8 path;
if (NFD::OpenDialog(path, nullptr, 0) == NFD_OKAY) {
SetWindowTitle(StrFormat("{} - RavEngine SceneViewer | {} ",Filesystem::Path(path.get()).filename().string(), GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} - RavEngine SceneViewer | {} ",Filesystem::Path(path.get()).filename().string(), GetRenderEngine().GetCurrentBackendName()).c_str());
static_pointer_cast<SceneViewerLevel>(GetCurrentRenderWorld())->AddData(path.get());
return true;
}
Expand All @@ -171,7 +171,7 @@ struct SceneViewerApp : public RavEngine::App {
return 0;
}

void OnFatal(const char* msg) final {
void OnFatal(const std::string_view msg) final {
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
4 changes: 2 additions & 2 deletions Samples/Shadows/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ struct Level : public RavEngine::World{
struct ShadowApp : public RavEngine::App {
void OnStartup(int argc, char** argv) final{
AddWorld(RavEngine::New<Level>());
SetWindowTitle(RavEngine::StrFormat("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
SetWindowTitle(std::format("{} | {}", APPNAME, GetRenderEngine().GetCurrentBackendName()).c_str());
}
void OnFatal(const char* msg) final {
void OnFatal(const std::string_view msg) final {
RavEngine::Dialog::ShowBasic("Fatal Error", msg, RavEngine::Dialog::MessageBoxType::Error);
}
};
Expand Down
Loading

0 comments on commit 0f30cac

Please sign in to comment.