I have as input an array of 3D points. And I need to draw a pipe that connects those points with each other so the first point is connected to the second one, the second to the third, ... The pipe has a square-shape (not a cilinder, but more a cuboid-shape like this figure) with a width of d. And the difference between two points goes always in just one direction (so when deltaX != 0 that means deltaY == 0 and deltaZ == 0).
What are the OpenGL commands to draw this model?