<commit_before>//
//  OpenGL.cpp
//  InternetMap
//

#include "OpenGL.hpp"
#include "Types.hpp"
#include <string>

#ifdef ANDROID 

#include <egl/egl.h>

PFNGLMAPBUFFEROESPROC glMapBufferOES;
PFNGLUNMAPBUFFEROESPROC glUnmapBufferOES;
bool gHasMapBuffer;

bool InitOpenGLExtensions(void) {
    std::string mapBufferExtension("GL_OES_mapbuffer");
    std::string extensions((char*)(glGetString(GL_EXTENSIONS)));

    gHasMapBuffer = extensions.find(mapBufferExtension) != std::string::npos;
    LOG("hasMapBuffer %d", (int)gHasMapBuffer);

    if(gHasMapBuffer) {
        glMapBufferOES = (PFNGLMAPBUFFEROESPROC) eglGetProcAddress("glMapBufferOES");
        glUnmapBufferOES = (PFNGLUNMAPBUFFEROESPROC) eglGetProcAddress("glUnmapBufferOES");
    }
    
    return gHasMapBuffer && glMapBufferOES && glUnmapBufferOES;
}

#endif<commit_msg>Just stick with the non-glMapBuffer path on all Android devices, it seems to be flakey.<commit_after>//
//  OpenGL.cpp
//  InternetMap
//

#include "OpenGL.hpp"
#include "Types.hpp"
#include <string>

#ifdef ANDROID 

#include <egl/egl.h>

PFNGLMAPBUFFEROESPROC glMapBufferOES;
PFNGLUNMAPBUFFEROESPROC glUnmapBufferOES;
bool gHasMapBuffer;

bool InitOpenGLExtensions(void) {
    std::string mapBufferExtension("GL_OES_mapbuffer");
    std::string extensions((char*)(glGetString(GL_EXTENSIONS)));

    gHasMapBuffer = false;// extensions.find(mapBufferExtension) != std::string::npos;
    LOG("hasMapBuffer %d", (int)gHasMapBuffer);

    if(gHasMapBuffer) {
        glMapBufferOES = (PFNGLMAPBUFFEROESPROC) eglGetProcAddress("glMapBufferOES");
        glUnmapBufferOES = (PFNGLUNMAPBUFFEROESPROC) eglGetProcAddress("glUnmapBufferOES");
    }
    
    return gHasMapBuffer && glMapBufferOES && glUnmapBufferOES;
}

#endif
{'fraction_non_alphanumeric': 0.11851851851851852, 'fraction_numerical': 0.0, 'mean_word_length': 5.316546762589928, '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': '4785521', 'n_tokens_mistral': 637, 'n_tokens_neox': 628, 'n_words': 100}