<commit_before>// Copyright (c) 2013-2016 <NAME>. All rights reserved.
// Licensed under a simplified BSD license (see LICENSE file).

package gl

//------------------------------------------------------------------------------

/*
#include "glad.h"
*/
import "C"

//------------------------------------------------------------------------------

//export logGLError
func logGLError(
	source C.GLenum,
	typ C.GLenum,
	id C.GLuint,
	severity C.GLenum,
	length C.GLsizei,
	m *C.char,
) {
	var sev string
	switch severity {
	case C.GL_DEBUG_SEVERITY_HIGH:
		sev = "ERROR"
	case C.GL_DEBUG_SEVERITY_MEDIUM:
		sev = "WARNING"
	case C.GL_DEBUG_SEVERITY_LOW:
		sev = "warning"
	case C.GL_DEBUG_SEVERITY_NOTIFICATION:
		sev = "info"
	}
	var sou string
	switch source {
	case C.GL_DEBUG_SOURCE_API:
		sou = "OpenGL"
	case C.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
		sou = "Window-system API"
	case C.GL_DEBUG_SOURCE_SHADER_COMPILER:
		sou = "Shader compiler"
	case C.GL_DEBUG_SOURCE_THIRD_PARTY:
		sou = "Third party"
	case C.GL_DEBUG_SOURCE_APPLICATION:
		sou = "Application"
	case C.GL_DEBUG_SOURCE_OTHER:
		sou = "Other source"
	}
	var ty string
	switch typ {
	case C.GL_DEBUG_TYPE_ERROR:
		ty = " (error)"
	case C.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
		ty = " (deprecated behavior)"
	case C.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
		ty = " (undefined behavior)"
	case C.GL_DEBUG_TYPE_PORTABILITY:
		ty = " (portability)"
	case C.GL_DEBUG_TYPE_PERFORMANCE:
		ty = " (performance)"
	case C.GL_DEBUG_TYPE_MARKER:
		ty = " (marker)"
	case C.GL_DEBUG_TYPE_PUSH_GROUP:
		ty = " (push group)"
	case C.GL_DEBUG_TYPE_POP_GROUP:
		ty = " (pop group)"
	case C.GL_DEBUG_TYPE_OTHER:
		ty = ""
	}

	debug.Printf("%s %s%s: %s\n", sou, sev, ty, C.GoString(m))
}

//------------------------------------------------------------------------------
<commit_msg>Disable verbose OpenGL debug info<commit_after>// Copyright (c) 2013-2016 <NAME>. All rights reserved.
// Licensed under a simplified BSD license (see LICENSE file).

package gl

//------------------------------------------------------------------------------

/*
#include "glad.h"
*/
import "C"

//------------------------------------------------------------------------------

//export logGLError
func logGLError(
	source C.GLenum,
	typ C.GLenum,
	id C.GLuint,
	severity C.GLenum,
	length C.GLsizei,
	m *C.char,
) {
	var sev string
	switch severity {
	case C.GL_DEBUG_SEVERITY_HIGH:
		sev = "ERROR"
	case C.GL_DEBUG_SEVERITY_MEDIUM:
		sev = "WARNING"
	case C.GL_DEBUG_SEVERITY_LOW:
		sev = "warning"
	case C.GL_DEBUG_SEVERITY_NOTIFICATION:
		sev = "info"
		return
	}
	var sou string
	switch source {
	case C.GL_DEBUG_SOURCE_API:
		sou = "OpenGL"
	case C.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
		sou = "Window-system API"
	case C.GL_DEBUG_SOURCE_SHADER_COMPILER:
		sou = "Shader compiler"
	case C.GL_DEBUG_SOURCE_THIRD_PARTY:
		sou = "Third party"
	case C.GL_DEBUG_SOURCE_APPLICATION:
		sou = "Application"
	case C.GL_DEBUG_SOURCE_OTHER:
		sou = "Other source"
	}
	var ty string
	switch typ {
	case C.GL_DEBUG_TYPE_ERROR:
		ty = " (error)"
	case C.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
		ty = " (deprecated behavior)"
	case C.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
		ty = " (undefined behavior)"
	case C.GL_DEBUG_TYPE_PORTABILITY:
		ty = " (portability)"
	case C.GL_DEBUG_TYPE_PERFORMANCE:
		ty = " (performance)"
	case C.GL_DEBUG_TYPE_MARKER:
		ty = " (marker)"
	case C.GL_DEBUG_TYPE_PUSH_GROUP:
		ty = " (push group)"
	case C.GL_DEBUG_TYPE_POP_GROUP:
		ty = " (pop group)"
	case C.GL_DEBUG_TYPE_OTHER:
		ty = ""
	}

	debug.Printf("%s %s%s: %s\n", sou, sev, ty, C.GoString(m))
}

//------------------------------------------------------------------------------

{'fraction_non_alphanumeric': 0.23028649386084585, 'fraction_numerical': 0.0043656207366985, 'mean_word_length': 2.3146473779385173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1949527', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1348, 'n_words': 293}