<commit_before>// Copyright (c) 2016, <NAME>. All rights reserved.
// Use of this source code is governed by a MIT-style license
// that can be found in the LICENSE file.

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Gl_Window.H>
#include <GLES3/gl3.h>
#include <cstdio>
#include <cmath>
#include <string>

using namespace std;

class MyGlWindow : public Fl_Gl_Window {
  /// Orthograpic projection matrix
  GLfloat matrix[16] = {
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
  };

  /// Shader attributes/uniforms
  GLint aVertexPosition, uPMatrix;

  /// Scene init status
  bool init = false;

  /// Vertex buffer
  GLuint vertexBuffer;

  void draw() {
    if (!valid()) {
      // Compile shaders.
      if (!init) {
        compileShaders();
        createBuffers();
        init = true;
      }

      // Set viewport.
      glViewport(0, 0, w(), h());

      // Compute new matrix.<commit_msg>Print GL version in opengles C++ example<commit_after>// Copyright (c) 2016, <NAME>. All rights reserved.
// Use of this source code is governed by a MIT-style license
// that can be found in the LICENSE file.

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Gl_Window.H>
#include <GLES3/gl3.h>
#include <cstdio>
#include <cmath>
#include <string>

using namespace std;

class MyGlWindow : public Fl_Gl_Window {
  /// Orthograpic projection matrix
  GLfloat matrix[16] = {
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
  };

  /// Shader attributes/uniforms
  GLint aVertexPosition, uPMatrix;

  /// Scene init status
  bool init = false;

  /// Vertex buffer
  GLuint vertexBuffer;

  void draw() {
    if (!valid()) {
      // Compile shaders.
      if (!init) {
        // Print version info once.
        printf("OpenGL version: %s\n", glGetString(GL_VERSION));

        compileShaders();
        createBuffers();
        init = true;
      }

      // Set viewport.
      glViewport(0, 0, w(), h());

      // Compute new matrix.
{'fraction_non_alphanumeric': 0.13710879284649777, 'fraction_numerical': 0.025832091405861898, 'mean_word_length': 2.4545454545454546, '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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3352472', 'n_tokens_mistral': 740, 'n_tokens_neox': 685, 'n_words': 223}