mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
Revert "[Fix] (...): Skip external libraries loading for MG_Test and MG_Bench."
This reverts commit da0e326534.
This commit is contained in:
+3
-2
@@ -14,12 +14,13 @@
|
||||
#include <MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.h>
|
||||
|
||||
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");
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@
|
||||
#include "Includes.h"
|
||||
|
||||
namespace MobileGL {
|
||||
void MG_Initialize(Bool loadExternalLibraries = true);
|
||||
void MG_Initialize();
|
||||
void MG_Destroy();
|
||||
} // namespace MobileGL
|
||||
@@ -85,6 +85,6 @@ namespace MobileGL {
|
||||
};
|
||||
} // namespace DirectGLES
|
||||
|
||||
void Init(Bool loadExternalLibraries);
|
||||
void Init();
|
||||
} // namespace MG_Backend
|
||||
} // namespace MobileGL
|
||||
|
||||
@@ -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<RendererInfo>(Unknown::RendererInfoUnknown);
|
||||
#endif
|
||||
|
||||
if (!loadExternalLibraries) {
|
||||
MGLOG_W("Skipping external library loading. Calling functions that call external libraries may cause "
|
||||
"crashes.");
|
||||
return;
|
||||
}
|
||||
|
||||
InitSpecificBackendLibs();
|
||||
LogBackendInfo();
|
||||
}
|
||||
|
||||
@@ -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<GLuint> 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<char*>(arg0_default);
|
||||
|
||||
@@ -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<char*>(arg0_default);
|
||||
|
||||
@@ -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 {}
|
||||
};
|
||||
|
||||
@@ -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 {}
|
||||
};
|
||||
|
||||
@@ -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 {}
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ protected:
|
||||
|
||||
return vbo;
|
||||
}
|
||||
void SetUp() override { MobileGL::MG_Initialize(false); }
|
||||
void SetUp() override { MobileGL::MG_Initialize(); }
|
||||
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user