<commit_before>//
// WulfGame/OpenGL/Renderer.cpp
// Copyright (C) 2012 <NAME>
// This code is freely available under the MIT licence.
//
#include "OpenGL/Renderer.h"

#include <GL/glfw.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <sstream>
#include <algorithm>
#include <functional>
#include <iostream>
#include "Map/Constants.h"

void errchck(const char* str);

using namespace Wulf;
namespace arg = std::placeholders; // whee

// Statix
#ifndef FREE_VIEW
static const glm::vec3 vPlyUp(0, 0, 1);
#endif

#ifdef _WIN32
// and fuck you too windows! (Enable sprintf)
#pragma warning( disable : 4996 )
#endif

void OpenGL::Renderer::WallsRenderChunk::mRenderFunction(const OpenGL::RenderChunk&) const
{
	glMultiDrawArrays(GL_TRIANGLE_FAN, &(*vFirsts)[0], &(*vCounts)[0], NumObjs);
}

void GenericRenderFunction (const OpenGL::RenderChunk& self)
{
	glDrawArrays(self.DrawMode, 0, self.NumObjs);
}

OpenGL::Renderer::Renderer()
: mgr(), fnt(mgr), strbuff(nullptr)
{
	/*
		A lot of the boilerplate code in this function is originally<commit_msg>Fix everything being upsidown<commit_after>//
// WulfGame/OpenGL/Renderer.cpp
// Copyright (C) 2012 <NAME>
// This code is freely available under the MIT licence.
//
#include "OpenGL/Renderer.h"

#include <GL/glfw.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <sstream>
#include <algorithm>
#include <functional>
#include <iostream>
#include "Map/Constants.h"

void errchck(const char* str);

using namespace Wulf;
namespace arg = std::placeholders; // whee

// Statix
#ifndef FREE_VIEW
static const glm::vec3 vPlyUp(0, 0, -1);
#endif

#ifdef _WIN32
// and fuck you too windows! (Enable sprintf)
#pragma warning( disable : 4996 )
#endif

void OpenGL::Renderer::WallsRenderChunk::mRenderFunction(const OpenGL::RenderChunk&) const
{
	glMultiDrawArrays(GL_TRIANGLE_FAN, &(*vFirsts)[0], &(*vCounts)[0], NumObjs);
}

void GenericRenderFunction (const OpenGL::RenderChunk& self)
{
	glDrawArrays(self.DrawMode, 0, self.NumObjs);
}

OpenGL::Renderer::Renderer()
: mgr(), fnt(mgr), strbuff(nullptr)
{
	/*
		A lot of the boilerplate code in this function is originally
{'fraction_non_alphanumeric': 0.14390804597701148, 'fraction_numerical': 0.015632183908045976, 'mean_word_length': 5.574018126888218, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2847977', 'n_tokens_mistral': 800, 'n_tokens_neox': 778, 'n_words': 200}