+#ifndef NDEBUG
+ if (buf.colors.size() < buf.vertices.size()) {
+ std::cerr << "BlockModel: not enough colors!" << std::endl;
+ }
+#endif
+ glBindBuffer(GL_ARRAY_BUFFER, handle[ATTRIB_COLOR]);
+ glBufferData(GL_ARRAY_BUFFER, buf.colors.size() * sizeof(glm::vec3), buf.colors.data(), GL_STATIC_DRAW);
+ glEnableVertexAttribArray(ATTRIB_COLOR);
+ glVertexAttribPointer(
+ ATTRIB_COLOR, // location (for shader)
+ 3, // size
+ GL_FLOAT, // type
+ GL_FALSE, // normalized
+ 0, // stride
+ nullptr // offset
+ );
+
+#ifndef NDEBUG
+ if (buf.lights.size() < buf.vertices.size()) {
+ std::cerr << "BlockModel: not enough lights!" << std::endl;