<commit_before>#include "OS.h"

#include <iostream>

namespace Sigma {

	bool OS::InitializeWindow(const int width, const int height, const std::string title, const unsigned int glMajor /*= 3*/, const unsigned int glMinor /*= 2*/) {
		// Initialize the library.
		if (glfwInit() != GL_TRUE) {
			return false;
		}

		glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
		glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, glMajor);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, glMinor);

#ifdef __APPLE__
        // Must use the Core Profile on OS X to get GL 3.2.
        glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#else
		glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);
#endif
        
		// Create a windowed mode window and its OpenGL context.
		this->window = glfwCreateWindow(width, height, title.c_str(), NULL, NULL);
			
		if (!this->window) {
			glfwTerminate();
			return false;
		}

		this->width = width;
		this->height = height;

		// Make the window's context current.
		glfwMakeContextCurrent(this->window);
		
#ifndef __APPLE__
		// setting glewExperimental fixes a glfw context problem
		// (tested on Ubuntu 13.04)
		glewExperimental = GL_TRUE;<commit_msg>Minor commit<commit_after>#include "OS.h"

#include <iostream>

namespace Sigma {

	bool OS::InitializeWindow(const int width, const int height, const std::string title, const unsigned int glMajor /*= 3*/, const unsigned int glMinor /*= 2*/) {
		// Initialize the library.
		if (glfwInit() != GL_TRUE) {
			return false;
		}

		glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
		glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, glMajor);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, glMinor);

#ifdef __APPLE__
        // Must use the Core Profile on OS X to get GL 3.2.
        glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#else
		glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);
#endif

		// Create a windowed mode window and its OpenGL context.
		this->window = glfwCreateWindow(width, height, title.c_str(), NULL, NULL);
			
		if (!this->window) {
			glfwTerminate();
			return false;
		}

		this->width = width;
		this->height = height;

		// Make the window's context current.
		glfwMakeContextCurrent(this->window);
		
#ifndef __APPLE__
		// setting glewExperimental fixes a glfw context problem
		// (tested on Ubuntu 13.04)
		glewExperimental = GL_TRUE;
{'fraction_non_alphanumeric': 0.10315873650539784, 'fraction_numerical': 0.006397441023590564, 'mean_word_length': 4.256302521008403, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2034083', 'n_tokens_mistral': 950, 'n_tokens_neox': 851, 'n_words': 214}