Mixing 2d and 3d

Hi. I’m writing a game in OpenGL. Everything is ok, but i need an HUD in 2d. I tried some solutions but i can’t get the 2d and the 3d together. Thanks.

draw the 3D as you do currently.
then before swapbuffers :

  • reset projection matrix, and set it to glortho
  • disable depth test
  • draw your 2D hud

it worked