|
ManualObject* manual = mSceneMgr->createManualObject("manual");
manual->begin("BaseWhiteNoLighting", RenderOperation::OT_TRIANGLE_LIST);
// define vertex position of index 0..2
manual->position(-100.0, -100.0, 0.0);
manual->position( 100.0, -100.0, 0.0);
manual->position( 100.0, 100.0, 0.0);
// define usage of vertices by refering to the indexes
manual->index(0);
manual->index(1);
manual->index(2);
manual->end();
mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(manual);
各位前輩,
以上OGRE的code可以畫出一個三角形,
但如果我把index的順序換成 0 2 1 或是 1 0 2,就畫不出來了,
是否用點描述一個三角形時有需要注意的地方?
請各位前輩不吝賜教,謝謝 |
|