<commit_before>#include "stdafx.h"
#include "mmcore/FlagStorage_GL.h"
#include "mmcore/FlagCall_GL.h"

using namespace megamol;
using namespace megamol::core;


FlagStorage_GL::FlagStorage_GL(void)
    : readFlagsSlot("readFlags", "Provides flag data to clients."),
    writeFlagsSlot("writeFlags", "Accepts updated flag data from clients."){

    this->readFlagsSlot.SetCallback(
        FlagCallRead_GL::ClassName(), FlagCallRead_GL::FunctionName(FlagCallRead_GL::CallGetData), &FlagStorage_GL::readDataCallback);
    this->readFlagsSlot.SetCallback(
        FlagCallRead_GL::ClassName(), FlagCallRead_GL::FunctionName(FlagCallRead_GL::CallGetMetaData), &FlagStorage_GL::readMetaDataCallback);
    this->MakeSlotAvailable(&this->readFlagsSlot);

    this->writeFlagsSlot.SetCallback(
        FlagCallWrite_GL::ClassName(), FlagCallWrite_GL::FunctionName(FlagCallWrite_GL::CallGetData), &FlagStorage_GL::writeDataCallback);
    this->writeFlagsSlot.SetCallback(
        FlagCallWrite_GL::ClassName(), FlagCallWrite_GL::FunctionName(FlagCallWrite_GL::CallGetMetaData), &FlagStorage_GL::writeMetaDataCallback);
    this->MakeSlotAvailable(&this->writeFlagsSlot);
}


FlagStorage_GL::~FlagStorage_GL(void) { this->Release(); };


bool FlagStorage_GL::create(void) {
    this->theData = std::make_shared<FlagCollection_GL>();
    this->theData->flags = std::make_shared<glowl::BufferObject>(GL_SHADER_STORAGE_BUFFER, nullptr, 10, GL_DYNAMIC_DRAW);<commit_msg>FlagStorage_GL fix: initial buffer content<commit_after>#include "stdafx.h"
#include "mmcore/FlagStorage_GL.h"
#include "mmcore/FlagCall_GL.h"

using namespace megamol;
using namespace megamol::core;


FlagStorage_GL::FlagStorage_GL(void)
    : readFlagsSlot("readFlags", "Provides flag data to clients."),
    writeFlagsSlot("writeFlags", "Accepts updated flag data from clients."){

    this->readFlagsSlot.SetCallback(
        FlagCallRead_GL::ClassName(), FlagCallRead_GL::FunctionName(FlagCallRead_GL::CallGetData), &FlagStorage_GL::readDataCallback);
    this->readFlagsSlot.SetCallback(
        FlagCallRead_GL::ClassName(), FlagCallRead_GL::FunctionName(FlagCallRead_GL::CallGetMetaData), &FlagStorage_GL::readMetaDataCallback);
    this->MakeSlotAvailable(&this->readFlagsSlot);

    this->writeFlagsSlot.SetCallback(
        FlagCallWrite_GL::ClassName(), FlagCallWrite_GL::FunctionName(FlagCallWrite_GL::CallGetData), &FlagStorage_GL::writeDataCallback);
    this->writeFlagsSlot.SetCallback(
        FlagCallWrite_GL::ClassName(), FlagCallWrite_GL::FunctionName(FlagCallWrite_GL::CallGetMetaData), &FlagStorage_GL::writeMetaDataCallback);
    this->MakeSlotAvailable(&this->writeFlagsSlot);
}


FlagStorage_GL::~FlagStorage_GL(void) { this->Release(); };


bool FlagStorage_GL::create(void) {
    this->theData = std::make_shared<FlagCollection_GL>();
    const int num = 10;
    std::vector<uint32_t> temp_data(num, FlagStorage::ENABLED);
    this->theData->flags = std::make_shared<glowl::BufferObject>(GL_SHADER_STORAGE_BUFFER, temp_data.data(), num, GL_DYNAMIC_DRAW);
{'fraction_non_alphanumeric': 0.13030602171767028, 'fraction_numerical': 0.0019743336623889436, 'mean_word_length': 7.636363636363637, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 32, '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': '6689486', 'n_tokens_mistral': 942, 'n_tokens_neox': 938, 'n_words': 120}