Opengl drawing a 2d overlay on a 3d scene problem

后端 未结 6 905
深忆病人
深忆病人 2020-12-05 09:02

I have a moving 3d scene set up, and I want to make a stationary 2d GUI overlay that is always on top, when I try making 2d shapes I don\'t see anything. When I call: glMatr

6条回答
  •  醉梦人生
    2020-12-05 09:36

    In addition, I also use a separate FBO for these kind of things. Usually the overlay doesn't have to be redrawn all the time, so render it on demand to a FBO and just render it as a fullscreen quad each frame. It wastes some fillrate but in general I find it is usually faster anyway and makes the code so much cleaner.

提交回复
热议问题