Don't call functions in asserts, they get compiled out in release...

This commit is contained in:
Henrik Rydgård 2017-10-20 14:45:00 +02:00
parent 45743642a9
commit b9ba525de1
9 changed files with 23 additions and 12 deletions

View file

@ -133,7 +133,8 @@ bool AndroidEGLGraphicsContext::Init(ANativeWindow *wnd, int backbufferWidth, in
gl->MakeCurrent();
CheckGLExtensions();
draw_ = Draw::T3DCreateGLContext();
assert(draw_->CreatePresets()); // There will always be a GLSL compiler capable of compiling these.
bool success = draw_->CreatePresets(); // There will always be a GLSL compiler capable of compiling these.
assert(success);
return true;
}
@ -158,7 +159,8 @@ public:
AndroidJavaEGLGraphicsContext() {
CheckGLExtensions();
draw_ = Draw::T3DCreateGLContext();
assert(draw_->CreatePresets());
bool success = draw_->CreatePresets();
assert(success);
}
~AndroidJavaEGLGraphicsContext() {
delete draw_;
@ -312,7 +314,8 @@ bool AndroidVulkanContext::Init(ANativeWindow *wnd, int desiredBackbufferSizeX,
}
g_Vulkan->InitObjects(true);
draw_ = Draw::T3DCreateVulkanContext(g_Vulkan);
assert(draw_->CreatePresets()); // Doesn't fail, we ship the compiler.
bool success = draw_->CreatePresets(); // Doesn't fail, we ship the compiler.
assert(success);
return true;
}