<commit_before>#include <possumwood_sdk/node_implementation.h>
#include <possumwood_sdk/app.h>

#include <OpenEXR/ImathVec.h>

#include <GL/glut.h>

#include "io/vec3.h"

namespace {

dependency_graph::InAttr<Imath::Vec3<float>> a_pos, a_size;

dependency_graph::State draw(const dependency_graph::Values& values) {
	const Imath::Vec3<float> pos = values.get(a_pos);
	const Imath::Vec3<float> size = values.get(a_size);

	glPushMatrix();

	glTranslatef(pos.x, pos.y, pos.z);
	glScalef(size.x, size.y, size.z);

	glDisable(GL_LIGHTING);
	glColor3f(1, 0, 0);
	glutWireCube(0.5f);
	glEnable(GL_LIGHTING);

	glPopMatrix();

	return dependency_graph::State();
}

void init(possumwood::Metadata& meta) {
	meta.addAttribute(a_pos, "position", Imath::Vec3<float>(0, 0, 0));
	meta.addAttribute(a_size, "size", Imath::Vec3<float>(1, 1, 1));

	meta.setDrawable(&draw);
}

possumwood::NodeImplementation s_impl("maths/cube", init);

}
<commit_msg>Removed GLUT dependency from maths plugin<commit_after>#include <possumwood_sdk/node_implementation.h>
#include <possumwood_sdk/app.h>

#include <OpenEXR/ImathVec.h>

#include <GL/gl.h>

#include "io/vec3.h"

namespace {

dependency_graph::InAttr<Imath::Vec3<float>> a_pos, a_size;

dependency_graph::State draw(const dependency_graph::Values& values) {
	const Imath::Vec3<float> pos = values.get(a_pos);
	const Imath::Vec3<float> size = values.get(a_size);

	glPushMatrix();

	glTranslatef(pos.x, pos.y, pos.z);
	glScalef(size.x, size.y, size.z);

	glDisable(GL_LIGHTING);
	glColor3f(1, 0, 0);

	glBegin(GL_LINES);

	glVertex3f(-1, -1, -1); glVertex3f(1, -1, -1);
	glVertex3f(1, -1, -1); glVertex3f(1, 1, -1);
	glVertex3f(1, 1, -1); glVertex3f(-1, 1, -1);
	glVertex3f(-1, 1, -1); glVertex3f(-1, -1, -1);

	glVertex3f(-1, -1, 1); glVertex3f(1, -1, 1);
	glVertex3f(1, -1, 1); glVertex3f(1, 1, 1);
	glVertex3f(1, 1, 1); glVertex3f(-1, 1, 1);
	glVertex3f(-1, 1, 1); glVertex3f(-1, -1, 1);

	glVertex3f(-1, -1, 1); glVertex3f(-1, -1, -1);
	glVertex3f(1, -1, 1); glVertex3f(1, -1, -1);
	glVertex3f(1, 1, 1); glVertex3f(1, 1, -1);
	glVertex3f(-1, 1, 1); glVertex3f(-1, 1, -1);

	glEnd();

	glEnable(GL_LIGHTING);

	glPopMatrix();

	return dependency_graph::State();
}

void init(possumwood::Metadata& meta) {
	meta.addAttribute(a_pos, "position", Imath::Vec3<float>(0, 0, 0));
	meta.addAttribute(a_size, "size", Imath::Vec3<float>(1, 1, 1));

	meta.setDrawable(&draw);
}

possumwood::NodeImplementation s_impl("maths/cube", init);

}

{'fraction_non_alphanumeric': 0.195696305318717, 'fraction_numerical': 0.05278116118554608, 'mean_word_length': 5.6415094339622645, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2993072', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1081, 'n_words': 196}