OpenGL 2D hud in 3D application

前端 未结 2 1833
有刺的猬
有刺的猬 2020-12-17 05:03

I have been trying to create a hud in my OpenGL application. Having looked around, it seems the way to do it is with an ortho projection, but so far I have not been able to

相关标签:
2条回答
  • 2020-12-17 05:38

    Once you're done rendering the HUD, you need to re-enable the depth writes

    glDepthMask(GL_TRUE);
    
    0 讨论(0)
  • 2020-12-17 05:54

    When you clear the buffers when rendering your HUD, all that has been drawn so far (your 3D scene) will also be cleared. So don't clear the buffer twice.

    0 讨论(0)
提交回复
热议问题