From 75e4c0b3b2b6497c4f81bfe5695e6570932162e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Jun 2014 12:41:20 +0300 Subject: Add error logging if shader compilation failure. --- src/render/modernopenglgraphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/render') diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index a166f64b9..96ce5e1ef 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -162,6 +162,11 @@ void ModernOpenGLGraphics::postInit() logger->log("Compiling shaders"); mProgram = shaders.getSimpleProgram(); + if (!mProgram) + { + graphicsManager.logError(); + logger->safeError("Shader creation error. See manaplus.log."); + } mProgramId = mProgram->getProgramId(); if (!mProgram) logger->error("Shaders compilation error."); -- cgit v1.2.3-70-g09d2