Esempio n. 1
0
 std::ostream& DebugLogStream(std::ostream& os, GLenum source, GLenum type, GLuint id, GLenum severity,
                              GLsizei length, const GLchar* message, GLvoid* userParam)
 {
   os << "Source: " << getStringForSource(source);
   os << "  Severity: " << getStringForSeverity(severity) << '\n';
   os << message << '\n';
   return os;
 }
Esempio n. 2
0
void CALLBACK DebugLog(GLenum source , GLenum type , GLuint id , GLenum severity ,
                       GLsizei length , const GLchar * message , const GLvoid * userParam)
{
    static log4cpp::Category &logger_opengl = log4cpp::Category::getInstance(std::string("log_opengl_trace"));

    logger_opengl.info("Type : %s; Source : %s; ID : %d; Severity : % s\n Message: %s",
                        getStringForType( type ),
                        getStringForSource( source ),
                        id,
                        getStringForSeverity( severity ),
                        message);
}
void /*CALLBACK */
VSDebugLib::DebugLog(GLenum source,
                       GLenum type,
                       GLuint id,
                       GLenum severity,
                       GLsizei length,
                       const GLchar* message,
					   void* userParam) {

	 *spOuts << " -- \n" << "Type: " <<
		getStringForType(type).c_str() << "; Source: " <<
		getStringForSource(source).c_str() <<"; ID: " << id << "; Severity: " <<
		getStringForSeverity(severity).c_str() << "\n" << message << "\n";

#if (defined _WIN32 || defined _LINUX)
	printStack();
#endif
	
	//	exit(1);
}