I wang to implement a trail renderer in my course about compute graphics using OpenGL. I google this question and search it in https://gamedev.stackexchange.com/ and find nothing except unity trail renderer. However this is my course project and I really really want a trail effect in my project.Is there any website or paper to solve my question?
The Unity trail renderer is basically a procedurally created triangle strip. This should be relatively easy to do on your own. Add an array to your game object which keeps track of the past positions and rotations of your object. Then create the geometry of your trail object each frame by creating vertices from these positons and rotations. Use the rotation to calculate a point slightly to the left and another point slightly to the right of the position. If you want the trail to become thinner in the end, reduce the distance the further the point is in the past. Set an appropriate material, pass the coordinates as a vertex buffer and you are done.