mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Merge branch 'master' of github.com:LaurentGomila/SFML
This commit is contained in:
commit
59a68f0a51
@ -34,13 +34,14 @@ namespace sf
|
||||
namespace priv
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
void glCheckError(const std::string& file, unsigned int line)
|
||||
void glCheckError(const char* file, unsigned int line)
|
||||
{
|
||||
// Get the last error
|
||||
GLenum errorCode = glGetError();
|
||||
|
||||
if (errorCode != GL_NO_ERROR)
|
||||
{
|
||||
std::string fileString(file);
|
||||
std::string error = "unknown error";
|
||||
std::string description = "no description";
|
||||
|
||||
@ -99,7 +100,7 @@ void glCheckError(const std::string& file, unsigned int line)
|
||||
|
||||
// Log the error
|
||||
err() << "An internal OpenGL call failed in "
|
||||
<< file.substr(file.find_last_of("\\/") + 1) << " (" << line << ") : "
|
||||
<< fileString.substr(fileString.find_last_of("\\/") + 1) << " (" << line << ") : "
|
||||
<< error << ", " << description
|
||||
<< std::endl;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace priv
|
||||
/// \param line Line number of the source file where the call is located
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void glCheckError(const std::string& file, unsigned int line);
|
||||
void glCheckError(const char* file, unsigned int line);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Make sure that GLEW is initialized
|
||||
|
Loading…
Reference in New Issue
Block a user