 													GLenum(GL_FLOAT), GLboolean(GL_FALSE),
 													GLsizei(MemoryLayout<Vertex>.stride), BUFFER_OFFSET(0))
 		glBindBuffer(GLenum(GL_ARRAY_BUFFER), primitive.attribBuffer)
-		glVertexAttribPointer(RenderPrimitive.Attribs.barycentric.rawValue, 2,
+		glVertexAttribPointer(RenderPrimitive.Attribs.barycentric.rawValue, 3,
 													GLenum(GL_FLOAT), GLboolean(GL_FALSE),
-													GLsizei(MemoryLayout<Vertex>.stride), BUFFER_OFFSET(0))
+													GLsizei(MemoryLayout<Float>.stride * 3), BUFFER_OFFSET(0))
 		glDrawArrays(GLenum(GL_TRIANGLES),
 								 0,
 								 primitive.elementCount)

			glGenBuffers(1, &attribBuffer)
			glBindBuffer(GLenum(GL_ARRAY_BUFFER), attribBuffer)
			glBufferData(GLenum(GL_ARRAY_BUFFER),
									 GLsizeiptr(MemoryLayout<Vertex>.stride * attribs.count),
									 attribs,
									 GLenum(GL_STATIC_DRAW))
		}

	}
	
	// Arrayed draw mode
	init(vertices: [Vertex], attribs: [Float], color c: (r: Float, g: Float, b: Float, a: Float), debugName: String) {
		mode = .Arrayed
		color = c
		name = debugName
