<commit_before>#include "DynamicPacker.h"
#include "ShaderNew.h"

#include "common/Exception.h"
#include "common/Vector.h"
#include "dataset/TPNode.h"
#include "view/Screen.h"
#include "render/PrimitiveDraw.h"
#include "render/style_config.h"

#include <opengl/opengl.h>
#include <gl/gl.h>
#include <gl/glu.h>

namespace d2d
{

DynamicPacker::DynamicPacker(int width, int height, int padding)
	: m_width(width)
	, m_height(height)
	, m_padding(padding)
{
	initOpenGLExtensions();

	InitTexture();
	InitFBO();
	InitRoot();
}

DynamicPacker::~DynamicPacker()
{
	glDeleteTextures(1, &m_tex);
	glDeleteFramebuffersEXT(1, &m_fbo);

	delete m_root;
}

void DynamicPacker::ReloadTexture()
{
	InitTexture(m_tex);
	InitFBO(m_fbo);
	ReloadPixels();
}

void DynamicPacker::DebugDraw() const
{
	ShaderNew* shader = ShaderNew::Instance();
	shader->SetFBO(0);<commit_msg>[ADDED] log for DynamicPacker ReloadTexture<commit_after>#include "DynamicPacker.h"
#include "ShaderNew.h"

#include "common/Exception.h"
#include "common/Vector.h"
#include "dataset/TPNode.h"
#include "view/Screen.h"
#include "render/PrimitiveDraw.h"
#include "render/style_config.h"

#include <opengl/opengl.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <wx/wx.h>

namespace d2d
{

DynamicPacker::DynamicPacker(int width, int height, int padding)
	: m_width(width)
	, m_height(height)
	, m_padding(padding)
{
	initOpenGLExtensions();

	InitTexture();
	InitFBO();
	InitRoot();
}

DynamicPacker::~DynamicPacker()
{
	glDeleteTextures(1, &m_tex);
	glDeleteFramebuffersEXT(1, &m_fbo);

	delete m_root;
}

void DynamicPacker::ReloadTexture()
{
	wxLogDebug(_T("DynamicPacker ReloadTexture"));

	InitTexture(m_tex);
	InitFBO(m_fbo);
	ReloadPixels();
}

void DynamicPacker::DebugDraw() const
{
	ShaderNew* shader = ShaderNew::Instance();
	shader->SetFBO(0);
{'fraction_non_alphanumeric': 0.15783664459161148, 'fraction_numerical': 0.004415011037527594, 'mean_word_length': 6.649789029535865, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, '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': '6122389', 'n_tokens_mistral': 729, 'n_tokens_neox': 719, 'n_words': 119}