#pragma once #include using namespace glm; constexpr auto P_SPHERE = 0x00; constexpr auto P_TORUS = 0x01; constexpr auto P_CONE = 0x02; constexpr auto P_CUBE = 0x03; constexpr auto P_ROUNDED_CUBE = 0x04; constexpr auto P_CYLINDER = 0x05; struct Primitive { vec4 position = vec4(0.0f, 0.0f, 0.0f, 1.0f); // 16 bytes vec4 diffuse_color = vec4(0.8f, 0.8f, 0.8f, 1.0f); // 16 bytes vec4 specular_color = vec4(1.0f, 1.0f, 1.0f, 1.0f); // 16 bytes vec4 ambient_color = vec4(0.2f, 0.2f, 0.2f, 1.0f); // 16 bytes int specular_exponent = 40; // 4 bytes unsigned int type = -1; // 4 bytes float radius = -1.f; // 4 bytes float height = -1.f; // 4 bytes float inner_radius = -1.f; // 4 bytes float outer_radius = -1.f; // 4 bytes float size = -1.f; // 4 bytes // Has to be a multiple of 32 bytes (96 in this case), currently only 92 unsigned int dummy = 0; unsigned int subtract = 0; unsigned int dummy2 = 0; unsigned int dummy3 = 0; unsigned int dummy4 = 0; Primitive(); Primitive(unsigned int shape); ~Primitive(); };