3d – How do I scale a cube in OpenGL?

The Idea is to make an arm consisting of three segments, each having a cube-like shape. For this I have made the cube inside a function called drawCube() – a set of 6 matrices (glm::mat4) translated and rotated to look like a cube – and would like to rescale this cube in order to make it longer or shorter as I please. I can’t do something of the sort glm::drawCube() cube = glm::scale(drawCube(), glm::vec3(1,2,3)) since drawCube() is not a variable type, so I don’t know how else to approach this.