I am currently trying to write a little game using OpenGL. The game itself is in 3D so I use all the matrix transformation and funcitons for my program. On the other hand, I would like to draw some 2D graphics in front my 3D scene to display various informations such as the number of remaining lifes, the score and also, print when a level is completed or even notify the end of the game. One good example is FPS game when the number of ammo, the remaining life points are displayed with the 3d scene (typically at the bottom)
I am looking at examples of code that mixes 2D sprites and 3d graphics but unfortunately, I did not find anything relevant. I would like to know if there are some examples for that or if somebody from the anddev community has an idea about how to proceed. I tried to do so but it seems that OpenGL mixes up everything and that I get the 2d sprites in cunjunction with the 3d scene. I think Iam not using/enabling the appropriate matrix but I do not really know what to enable/disable and in which order.
So, if somebody has some code example and can be of any help, that would be very useful
Thanks for any suggestion