Added Window::showMessageBox.
ecode:
Closes SpartanJ/ecode#93 (ecode does not properly warn the user of the lack of GPU acceleration).
Minor refactor.
This commit is contained in:
Martín Lucas Golini
2023-04-02 19:37:31 -03:00
parent 47e744dccb
commit ab04f9b06e
9 changed files with 65 additions and 9 deletions

View File

@@ -2929,6 +2929,19 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe
ecode::Version::getCodename().c_str() );
if ( mWindow->isOpen() ) {
// Only verify GPU driver availability on Windows.
// macOS will have at least a fallback renderer
// Linux will have at least Mesa drivers with LLVM Pipe
#if EE_PLATFORM == EE_PLATFORM_WIN
if ( !GLi->shadersSupported() ) {
mWindow->showMessageBox(
EE::Window::Window::MessageBoxType::Error, "ecode",
"ecode detected that there are no GPU drivers available or that the GPU does not "
"support shaders.\nThis will prevent ecode to properly function.\nPlease check "
"that your GPU drivers are installed." );
return;
}
#endif
#if EE_PLATFORM == EE_PLATFORM_MACOSX
macOS_CreateApplicationMenus();
#endif