diff --git a/MobileGL/Init.cpp b/MobileGL/Init.cpp index 5038892f..308f1fb1 100644 --- a/MobileGL/Init.cpp +++ b/MobileGL/Init.cpp @@ -14,12 +14,13 @@ #include namespace MobileGL { - void MG_Initialize(Bool loadExternalLibraries) { + void MG_Initialize() { MG_Util::Debug::InitFile(); MGLOG_I("Initializing MobileGL..."); MG_State::Init(); MGLOG_D("MobileGL State initialized"); - MG_Backend::Init(loadExternalLibraries); + // return; + MG_Backend::Init(); MGLOG_D("MobileGL Backend initialized"); MG_Impl::Init(); MGLOG_D("MobileGL Implementation initialized"); diff --git a/MobileGL/Init.h b/MobileGL/Init.h index eb6a2207..39353ad6 100644 --- a/MobileGL/Init.h +++ b/MobileGL/Init.h @@ -9,6 +9,6 @@ #include "Includes.h" namespace MobileGL { - void MG_Initialize(Bool loadExternalLibraries = true); + void MG_Initialize(); void MG_Destroy(); } // namespace MobileGL \ No newline at end of file diff --git a/MobileGL/MG_Backend/Backends.h b/MobileGL/MG_Backend/Backends.h index 62c0b1cc..10b9a3d1 100644 --- a/MobileGL/MG_Backend/Backends.h +++ b/MobileGL/MG_Backend/Backends.h @@ -85,6 +85,6 @@ namespace MobileGL { }; } // namespace DirectGLES - void Init(Bool loadExternalLibraries); + void Init(); } // namespace MG_Backend } // namespace MobileGL diff --git a/MobileGL/MG_Backend/Init.cpp b/MobileGL/MG_Backend/Init.cpp index e22a6209..58125171 100644 --- a/MobileGL/MG_Backend/Init.cpp +++ b/MobileGL/MG_Backend/Init.cpp @@ -53,7 +53,7 @@ namespace MobileGL { #endif } - void Init(Bool loadExternalLibraries) { + void Init() { MGLOG_D("Initializing MobileGL Backend..."); #if MOBILEGL_BACKEND == MOBILEGL_BACKEND_DILIGENT @@ -73,12 +73,6 @@ namespace MobileGL { MG_Config::RendererInfoPtr = MakeUnique(Unknown::RendererInfoUnknown); #endif - if (!loadExternalLibraries) { - MGLOG_W("Skipping external library loading. Calling functions that call external libraries may cause " - "crashes."); - return; - } - InitSpecificBackendLibs(); LogBackendInfo(); } diff --git a/MobileGL/MG_Benchmark/Buffer/BufferBench.cpp b/MobileGL/MG_Benchmark/Buffer/BufferBench.cpp index 59d8ee5b..9797c698 100644 --- a/MobileGL/MG_Benchmark/Buffer/BufferBench.cpp +++ b/MobileGL/MG_Benchmark/Buffer/BufferBench.cpp @@ -60,7 +60,7 @@ static void BM_CreateBufferObjectsAndBindBuffer(benchmark::State& state) { BENCHMARK(BM_CreateBufferObjectsAndBindBuffer)->Unit(benchmark::kMillisecond)->UseRealTime(); static void BM_DeleteBufferObjects(benchmark::State& state) { - MG_Initialize(false); + MG_Initialize(); std::vector buffers(BUFFER_COUNT); for (auto _ : state) { @@ -178,7 +178,7 @@ static void BM_UpdateDataPartially(benchmark::State& state) { BENCHMARK(BM_UpdateDataPartially)->Unit(benchmark::kMillisecond)->UseRealTime(); int main(int argc, char** argv) { - MG_Initialize(false); + MG_Initialize(); benchmark ::MaybeReenterWithoutASLR(argc, argv); char arg0_default[] = "benchmark"; char* args_default = reinterpret_cast(arg0_default); diff --git a/MobileGL/MG_Benchmark/Program/ProgramBench.cpp b/MobileGL/MG_Benchmark/Program/ProgramBench.cpp index 8901c8e1..fc42fd63 100644 --- a/MobileGL/MG_Benchmark/Program/ProgramBench.cpp +++ b/MobileGL/MG_Benchmark/Program/ProgramBench.cpp @@ -220,7 +220,7 @@ static void BM_CompileAndLink(benchmark::State& state) { BENCHMARK(BM_CompileAndLink)->Unit(benchmark::kMillisecond); int main(int argc, char** argv) { - MG_Initialize(false); + MG_Initialize(); benchmark ::MaybeReenterWithoutASLR(argc, argv); char arg0_default[] = "benchmark"; char* args_default = reinterpret_cast(arg0_default); diff --git a/MobileGL/MG_Test/Buffer/BufferTest.cpp b/MobileGL/MG_Test/Buffer/BufferTest.cpp index 34acc61d..a9bd9053 100644 --- a/MobileGL/MG_Test/Buffer/BufferTest.cpp +++ b/MobileGL/MG_Test/Buffer/BufferTest.cpp @@ -18,7 +18,7 @@ using namespace MobileGL; class BufferTest : public ::testing::Test { protected: - void SetUp() override { MobileGL::MG_Initialize(false); } + void SetUp() override { MobileGL::MG_Initialize(); } void TearDown() override {} }; diff --git a/MobileGL/MG_Test/Program/ProgramTest.cpp b/MobileGL/MG_Test/Program/ProgramTest.cpp index 8e7b3c76..297f3859 100644 --- a/MobileGL/MG_Test/Program/ProgramTest.cpp +++ b/MobileGL/MG_Test/Program/ProgramTest.cpp @@ -17,7 +17,7 @@ using namespace MobileGL::MG_Impl::GLImpl; class ProgramTest : public ::testing::Test { protected: - void SetUp() override { MobileGL::MG_Initialize(false); } + void SetUp() override { MobileGL::MG_Initialize(); } void TearDown() override {} }; diff --git a/MobileGL/MG_Test/Program/ProgramUtilTest.cpp b/MobileGL/MG_Test/Program/ProgramUtilTest.cpp index 35c4f8a1..328579b9 100644 --- a/MobileGL/MG_Test/Program/ProgramUtilTest.cpp +++ b/MobileGL/MG_Test/Program/ProgramUtilTest.cpp @@ -18,7 +18,7 @@ using namespace MobileGL; class ProgramUtilTest : public ::testing::Test { protected: - void SetUp() override { MobileGL::MG_Initialize(false); } + void SetUp() override { MobileGL::MG_Initialize(); } void TearDown() override {} }; diff --git a/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp b/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp index 5aa68425..ba423020 100644 --- a/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp +++ b/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp @@ -32,7 +32,7 @@ protected: return vbo; } - void SetUp() override { MobileGL::MG_Initialize(false); } + void SetUp() override { MobileGL::MG_Initialize(); } void TearDown() override {} };