ClearAll[prism];
prism[pts_List, h_] :=
Module[{bottoms, tops, surfacePoints, sidePoints, n},
surfacePoints =
Table[Map[PadRight[#, 3, height] &, pts], {height, {0, h}}];
{bottoms, tops} = {Most[#], Rest[#]} &@surfacePoints;
sidePoints =
Flatten[{bottoms, RotateLeft[bottoms, {0, 1}],
RotateLeft[tops, {0, 1}], tops}, {{2, 3}, {1}}];
n = Length[sidePoints];
MapThread[
Polygon[#1, VertexNormals -> (#1 - #2),
VertexTextureCoordinates -> #3] &, {Join[sidePoints,
surfacePoints],
Join[Map[{0, 0, 1} # &, sidePoints, {2}],
Map[({1, 1, 0} # + {0, 0, h/2}) &, surfacePoints, {2}]],
Join[Table[{{i/n, 0}, {(i + 1)/n, 0}, {(i + 1)/n, 1}, {i/n,
1}}, {i, 0, n - 1}], Table[None, {Length[surfacePoints]}]]}]]
Clear[cyl];
cyl[{pt1_, pt2_}, r_: 1, n_: 90] :=
Module[{circle =
r Table[{Cos[\[Phi]], Sin[\[Phi]]}, {\[Phi], Pi/n, 2 Pi, Pi/n}],
h = EuclideanDistance[pt1, pt2]},
GeometricTransformation[prism[circle, h],
Composition[TranslationTransform[pt1],
Quiet[Check[RotationTransform[{{0, 0, 1.}, pt2 - pt1}],
Identity]]]]]
Graphics3D[{Texture[], EdgeForm[], cyl[{{0, 0, 0}, {0, 0, 2 Pi}}, 1]}, Boxed -> True,
Axes -> True]
I want to inserted in the beginning and the end of cylinder texture but it didint work:

