<commit_before>package gl

// #include <stdlib.h>
// #define GL_GLEXT_PROTOTYPES
//
// int glewInit(void);
//
// void* cmalloc(int s){return malloc(s);};
//
// #ifdef __Darwin
// # include <OpenGL/gl.h>
// # include <OpenGL/glext.h>
// #else
// # include <GL/gl.h>
// # include <GL/glext.h>
// #endif
import "C"
import "unsafe"

type GLenum C.GLenum
type GLbitfield C.GLbitfield
type GLclampf C.GLclampf
type GLclampd C.GLclampd

type Pointer unsafe.Pointer

// helpers

func glBool(v bool) C.GLboolean {
	if v {
		return 1
	}

	return 0

}

func goBool(v C.GLboolean) bool {
	return v != 0
}

func glString(s string) *C.GLchar { return (*C.GLchar)(C.CString(s)) }

func freeString(ptr *C.GLchar) { C.free(unsafe.Pointer(ptr)) }

// GLEW

func Init() int { return int(C.glewInit()) }

// Object

type Object C.GLuint<commit_msg>make gl20 compatible with glu<commit_after>package gl

// #include <stdlib.h>
// #define GL_GLEXT_PROTOTYPES
//
// int glewInit(void);
//
// void* cmalloc(int s){return malloc(s);};
//
// #ifdef __Darwin
// # include <OpenGL/gl.h>
// # include <OpenGL/glext.h>
// #else
// # include <GL/gl.h>
// # include <GL/glext.h>
// #endif
import "C"
import "unsafe"

type GLenum C.GLenum
type GLbitfield C.GLbitfield
type GLclampf C.GLclampf
type GLclampd C.GLclampd

type Pointer unsafe.Pointer

// those types are left for compatibility reasons
type GLboolean C.GLboolean
type GLbyte C.GLbyte
type GLshort C.GLshort
type GLint C.GLint
type GLsizei C.GLsizei
type GLubyte C.GLubyte
type GLushort C.GLushort
type GLuint C.GLuint
type GLfloat C.GLfloat
type GLdouble C.GLdouble

// helpers

func glBool(v bool) C.GLboolean {
	if v {
		return 1
	}

	return 0

}

func goBool(v C.GLboolean) bool {
	return v != 0
}

func glString(s string) *C.GLchar { return (*C.GLchar)(C.CString(s)) }

func freeString(ptr *C.GLchar) { C.free(unsafe.Pointer(ptr)) }

// GLEW

func Init() int { return int(C.glewInit()) }

// Object

type Object C.GLuint
{'fraction_non_alphanumeric': 0.14644137224782386, 'fraction_numerical': 0.00409626216077829, 'mean_word_length': 3.440909090909091, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5465957', 'n_tokens_mistral': 804, 'n_tokens_neox': 777, 'n_words': 202}