本文整理汇总了C++中Pyramid::createVAO方法的典型用法代码示例。如果您正苦于以下问题:C++ Pyramid::createVAO方法的具体用法?C++ Pyramid::createVAO怎么用?C++ Pyramid::createVAO使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pyramid
的用法示例。
在下文中一共展示了Pyramid::createVAO方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBoneHierarchy
void TwoBones::SetBoneHierarchy()
{
// setup the bone model, this case we are using pyramid
// todo - create a cool Bone Object, ball(drk blue) + pyramid arm (dark yellow)
Pyramid* pPyramid = new Pyramid();
pPyramid->loadTexture();
pPyramid->createVAO();
// Get the manager
GraphicsObjectManager *goMgr = GraphicsObjectManager::getInstance();
// here we insert bones directly into tree -
// vs calling goMgr->addObject which inserts every node with root as parent FIXME
PCSTree* tree = goMgr->getTree();
PCSNode* root = tree->getRoot();
// create two bones
PyramidObject* p0 = new PyramidObject( "name", pPyramid );
p0->setIndex(0);
p0->setName("Bone_0");
tree->insert(p0, root);
p0->setPos( Vect(0.0f, 0.0f, 0.0f) );
p0->setLightPos( Vect(50.0f, 50.0f, 0.0f) );
p0->setLightColor( Vect(1.5f, 0.5f, 0.5f) ); // RED
PyramidObject* p1 = new PyramidObject( "name", pPyramid );
p1->setIndex(1);
p1->setName("Bone_1");
tree->insert(p1, p0);
p1->setPos( Vect(1.0f, 1.0f, 0.0f) );
p1->setLightPos( Vect(50.0f, 50.0f, 0.0f) );
p1->setLightColor( Vect(0.5f, 1.5f, 0.5f) ); // Green
// set the first bone to pass into updateSkeleton in GlobalState.cpp's GameLoop()
this->SetFirstBone(p0);
// Debug
tree->dumpTree();
}