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

后端 未结 6 904
深忆病人
深忆病人 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:17

    '    glGetBooleanv(GL_BLEND,        &m_origin_blend);
    glGetBooleanv(GL_DEPTH_TEST,&m_origin_depth);
    glGetBooleanv(GL_CULL_FACE, &m_origin_cull);
    
    setAlphaBlending(true);
    setDepthTest(false);
    setCullFace(false); //by stone
    
    //ur draw core()
    
    setAlphaBlending(m_origin_blend>0?true:false);
    setDepthTest(m_origin_depth>0?true:false);
    setCullFace(m_origin_cull>0?true:false); //by stone
    '
    

提交回复
热议问题