游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2570|回复: 0

關於OGRE的ManualObject indices

[复制链接]

1

主题

1

帖子

5

积分

新手上路

Rank: 1

积分
5
发表于 2013-12-5 17:54:09 | 显示全部楼层 |阅读模式
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,就畫不出來了,
是否用點描述一個三角形時有需要注意的地方?

請各位前輩不吝賜教,謝謝
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-2-26 05:46

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表