<commit_before>#include "GLES2Util.h"

#include "platform/Log.h"
#include <limits>
#include <algorithm>

using namespace Supernova;

GLuint GLES2Util::emptyTexture;
bool GLES2Util::emptyTextureLoaded;

GLES2Util::GLES2Util() {
	// TODO Auto-generated constructor stub

}

GLES2Util::~GLES2Util() {
	// TODO Auto-generated destructor stub
}


void GLES2Util::checkGlError(const char* op) {
    for (GLint error = glGetError(); error; error = glGetError()) {
        Log::Error(LOG_TAG,"after %s() glError (0x%x)\n", op, error);
    }
}

void GLES2Util::generateEmptyTexture() {
    if (!GLES2Util::emptyTextureLoaded){
        glGenTextures(1, &GLES2Util::emptyTexture);
        glBindTexture(GL_TEXTURE_2D, GLES2Util::emptyTexture);
        glTexImage2D(GL_TEXTURE_2D, 0,GL_RGB, 1, 1, 0,GL_RGB, GL_UNSIGNED_BYTE, 0);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        GLES2Util::emptyTextureLoaded = true;<commit_msg>Removed OpenGL error print because slow render<commit_after>#include "GLES2Util.h"

#include "platform/Log.h"
#include <limits>
#include <algorithm>

using namespace Supernova;

GLuint GLES2Util::emptyTexture;
bool GLES2Util::emptyTextureLoaded;

GLES2Util::GLES2Util() {
	// TODO Auto-generated constructor stub

}

GLES2Util::~GLES2Util() {
	// TODO Auto-generated destructor stub
}


void GLES2Util::checkGlError(const char* op) {
    // TODO: Activate only in debug mode
    // Can cause slow render
    
    //for (GLint error = glGetError(); error; error = glGetError()) {
    //    Log::Error(LOG_TAG,"after %s() glError (0x%x)\n", op, error);
    //}
}

void GLES2Util::generateEmptyTexture() {
    if (!GLES2Util::emptyTextureLoaded){
        glGenTextures(1, &GLES2Util::emptyTexture);
        glBindTexture(GL_TEXTURE_2D, GLES2Util::emptyTexture);
        glTexImage2D(GL_TEXTURE_2D, 0,GL_RGB, 1, 1, 0,GL_RGB, GL_UNSIGNED_BYTE, 0);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        GLES2Util::emptyTextureLoaded = true;
{'fraction_non_alphanumeric': 0.1244218316373728, 'fraction_numerical': 0.02312673450508788, 'mean_word_length': 4.752659574468085, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7043713', 'n_tokens_mistral': 795, 'n_tokens_neox': 771, 'n_words': 145}