<commit_before>#include "font2D.hpp"
#include "entity_templates.hpp"
#include "code/ylikuutio/loaders/shader_loader.hpp"
#include "code/ylikuutio/loaders/texture_loader.hpp"

// Include GLEW
#ifndef __GL_GLEW_H_INCLUDED
#define __GL_GLEW_H_INCLUDED
#include <GL/glew.h> // GLfloat, GLuint etc.
#endif

// Include GLM
#ifndef __GLM_GLM_HPP_INCLUDED
#define __GLM_GLM_HPP_INCLUDED
#include <glm/glm.hpp> // glm
#endif

#ifndef __GLM_GTC_MATRIX_TRANSFORM_HPP_INCLUDED
#define __GLM_GTC_MATRIX_TRANSFORM_HPP_INCLUDED
#include <glm/gtc/matrix_transform.hpp>
#endif

// Include standard headers
#include <vector>   // std::vector
#include <cstring>  // std::memcmp, std::strcmp, std::strlen, std::strncmp
#include <stdint.h> // uint32_t etc.
#include <string>   // std::string

namespace ontology
{
    class Universe;

    Font2D::Font2D(
            ontology::Universe* universe_pointer,
            GLuint screen_width,
            GLuint screen_height,
            std::string texture_filename,
            std::string font_texture_file_format)
    {
        // constructor.
        const char* char_font_texture_file_format = font_texture_file_format.c_str();

        // Initialize texture
        if ((std::strcmp(char_font_texture_file_format, "bmp") == 0) || (std::strcmp(char_font_texture_file_format, "BMP") == 0))
        {
            this->texture = loaders::load_BMP_texture(texture_filename);
        }
        else if ((std::strcmp(char_font_texture_file_format, "dds") == 0) || (std::strcmp(char_font_texture_file_format, "DDS") == 0))
        {
            this->texture = loaders::load_DDS_texture(texture_filename);
        }
        else
        {<commit_msg>Bugfix `Font2D::Font2D`: initialize class members (with dummy values).<commit_after>#include "font2D.hpp"
#include "entity_templates.hpp"
#include "code/ylikuutio/loaders/shader_loader.hpp"
#include "code/ylikuutio/loaders/texture_loader.hpp"

// Include GLEW
#ifndef __GL_GLEW_H_INCLUDED
#define __GL_GLEW_H_INCLUDED
#include <GL/glew.h> // GLfloat, GLuint etc.
#endif

// Include GLM
#ifndef __GLM_GLM_HPP_INCLUDED
#define __GLM_GLM_HPP_INCLUDED
#include <glm/glm.hpp> // glm
#endif

#ifndef __GLM_GTC_MATRIX_TRANSFORM_HPP_INCLUDED
#define __GLM_GTC_MATRIX_TRANSFORM_HPP_INCLUDED
#include <glm/gtc/matrix_transform.hpp>
#endif

// Include standard headers
#include <vector>   // std::vector
#include <cstring>  // std::memcmp, std::strcmp, std::strlen, std::strncmp
#include <stdint.h> // uint32_t etc.
#include <string>   // std::string

namespace ontology
{
    class Universe;

    Font2D::Font2D(
            ontology::Universe* universe_pointer,
            GLuint screen_width,
            GLuint screen_height,
            std::string texture_filename,
            std::string font_texture_file_format)
    {
        // constructor.

        // Initialize class members with some dummy values.
        this->vertexbuffer = 0;
        this->uvbuffer = 0;
        this->programID = 0;
        this->vertex_position_in_screenspaceID = 0;
        this->vertexUVID = 0;
        this->Text2DUniformID = 0;
        this->screen_width_uniform_ID = 0;
        this->screen_height_uniform_ID = 0;

        const char* char_font_texture_file_format = font_texture_file_format.c_str();

        // Initialize texture
        if ((std::strcmp(char_font_texture_file_format, "bmp") == 0) || (std::strcmp(char_font_texture_file_format, "BMP") == 0))
        {
            this->texture = loaders::load_BMP_texture(texture_filename);
        }
        else if ((std::strcmp(char_font_texture_file_format, "dds") == 0) || (std::strcmp(char_font_texture_file_format, "DDS") == 0))
        {
            this->texture = loaders::load_DDS_texture(texture_filename);
        }
        else
        {
{'fraction_non_alphanumeric': 0.11828814460393408, 'fraction_numerical': 0.007708665603402445, 'mean_word_length': 3.385780885780886, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 29, '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': '650098', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1299, 'n_words': 226}