Ogre 線框模型

來源:互聯網
上載者:User

Ogre渲染模式:平面(solid)、線框(wireframe)、定(point)

Ogre中可以把某單個物體以線框模式顯示,方法有兩種:

1、直接更改材質檔案(material),在pass中設定此種材質的渲染模式為線框模式:polygon_mode <wireframe|point|solid>

      例如:

material Material_#47/polagrel1
{
     technique
    {
        pass
       {
             ambient 1 1 1 1
             diffuse 0.705882 0.705882 0.705882 1
             specular 0.05 0.05 0.05 1 4
             polygon_mode wireframe
       }

    }

}

2、在程式中改材質檔案:polacub1->getSubEntity(0)->getMaterial()->getTechnique(0)->getPass(0)->setPolygonMode(Ogre::PolygonMode::PM_WIREFRAME);

註:也可以設定攝像機的渲染模式為線框模式,整個情境的物體都是線框模式,這個是強制性的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.