I have an application that shows a 3D model via WebGL. It's possible to rotate, translate and zoom. Now I would like to render a 2D mouse cursor. Of course I can't just add a polygon to this 3D space, because the polygon would behave as a 3D object when the user uses transformation operations.
I thought about drawing on the near clipping plane, because I think the polygon wouldn't be affected by transformations. But I can't figure out how I can get the near plane coordinates of the triangle for drawing.
I would like to calculate the triangle coordinates on the near clipping plane and set the new vertices of the triangle inside of the buffer.
Does anyone know how I can achieve this? Is there another way to draw a 2D polygon in a 3D room?