]> git.sesse.net Git - casparcg/commitdiff
Improved missing OpenGL 3.0 error reporting
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 30 Jan 2012 12:13:10 +0000 (12:13 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 30 Jan 2012 12:13:10 +0000 (12:13 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@2170 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/mixer/gpu/ogl_device.cpp
shell/main.cpp

index dd5616f0cd63bc313ec8ddbe40617abbffd045af..0df165b92521c3758af8a146e9e1d5b18ec54e31 100644 (file)
@@ -63,7 +63,7 @@ ogl_device::ogl_device()
                CASPAR_LOG(info) << L"OpenGL " << version();\r
 \r
                if(!GLEW_VERSION_3_0)\r
-                       CASPAR_LOG(warning) << "Missing OpenGL 3.0 support.";\r
+                       BOOST_THROW_EXCEPTION(gl::ogl_exception() << msg_info("Your graphics card does not meet the minimum hardware requirements since it does not support OpenGL 3.0 or higher. CasparCG Server will not be able to continue."));\r
        \r
                glGenFramebuffers(1, &fbo_);    \r
                \r
index f746d988a75614fc536319226f7ae439e75ba4e3..10eaa7acd5c3271b4eb58d4bd67650d38f428f49 100644 (file)
@@ -317,15 +317,13 @@ int main(int argc, wchar_t* argv[])
                CASPAR_LOG(fatal) << L"Unhandled configuration error in main thread. Please check the configuration file (casparcg.config) for errors.";\r
                system("pause");        \r
        }\r
-       catch(caspar::gl::ogl_exception&)\r
-       {\r
-               CASPAR_LOG_CURRENT_EXCEPTION();\r
-               CASPAR_LOG(fatal) << L"Unhandled OpenGL Error in main thread. Please try to update graphics drivers for OpenGL 3.0+ Support.";\r
-       }\r
        catch(...)\r
        {\r
                CASPAR_LOG_CURRENT_EXCEPTION();\r
                CASPAR_LOG(fatal) << L"Unhandled exception in main thread. Please report this error on the CasparCG forums (www.casparcg.com/forum).";\r
+               Sleep(1000);\r
+               std::wcout << L"\n\nCasparCG will automatically shutdown. See the log file located at the configured log-file folder for more information.\n\n";\r
+               Sleep(4000);\r
        }       \r
        \r
        return 0;\r