improved logging

This commit is contained in:
Roman Sorokin 2014-07-25 18:15:53 +03:00 committed by Alex Zolotarev
parent d5ef074885
commit 6076c2e9ed

View file

@ -2,6 +2,7 @@
#include "glfunctions.hpp"
#include "../base/assert.hpp"
#include "../../base/logging.hpp"
#ifdef DEBUG
#include "../std/map.hpp"
@ -54,7 +55,8 @@ GpuProgram::GpuProgram(RefPointer<Shader> vertexShader, RefPointer<Shader> fragm
GLFunctions::glAttachShader(m_programID, fragmentShader->GetID());
string errorLog;
VERIFY(GLFunctions::glLinkProgram(m_programID, errorLog), (errorLog));
if (!GLFunctions::glLinkProgram(m_programID, errorLog))
LOG(LINFO, ("Program ", m_programID, " link error = ", errorLog));
GLFunctions::glDetachShader(m_programID, vertexShader->GetID());
GLFunctions::glDetachShader(m_programID, fragmentShader->GetID());