Beispiel #1
0
void CALLBACK DebugLogAMD(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam) {
    static log4cpp::Category &logger_opengl = log4cpp::Category::getInstance(std::string("log_opengl_trace"));

    logger_opengl.info("%s; ID : %d; Severity : % s\n Message: %s",
                        getStringForType( category ),
                        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);
}