本文整理汇总了C++中osg::WindowRecPtr::render方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowRecPtr::render方法的具体用法?C++ WindowRecPtr::render怎么用?C++ WindowRecPtr::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::WindowRecPtr
的用法示例。
在下文中一共展示了WindowRecPtr::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: display
void display(void)
{
#if 0
Matrix m1, m2, m3;
Quaternion q1;
tball.getRotation().getValue(m3);
q1.setValue(m3);
m1.setRotate(q1);
m2.setTranslate( tball.getPosition() );
m1.mult( m2 );
if(move_obj == true)
{
scene_trans->editSFMatrix()->setValue( m1 );
}
else
{
cam_trans->editSFMatrix()->setValue( m1 );
}
#endif
cam_trans->editSFMatrix()->setValue(tball.getFullTrackballMatrix());
#if 0
fprintf(stderr, "%f %f %f\n",
cam_trans->getMatrix()[3][0],
cam_trans->getMatrix()[3][1],
cam_trans->getMatrix()[3][2]);
#endif
OSG::Real32 t = glutGet(GLUT_ELAPSED_TIME);
for(OSG::UInt32 i = 0; i < 6; ++i)
{
if(pAnimTrs[i] != NULL)
{
pAnimTrs[i]->editRotation().setValueAsAxisDeg(
0.f, 1.f, 0.f,
t / 50.f);
}
}
OSG::commitChanges();
// fprintf(stderr, "Frame start\n");
// fprintf(stderr, "============================================\n");
win->render(rentravact);
}
示例2: display
void display(void)
{
OSG::Matrix m1;
m1 = tball.getFullTrackballMatrix();
cam_trans->editSFMatrix()->setValue(m1);
OSG::commitChanges();
win->render(rentravact);
}
示例3: display
void display(void)
{
OSG::Matrix m1, m2, m3;
OSG::Quaternion q1;
tball.getRotation().getValue(m3);
q1.setValue(m3);
m1.setRotate(q1);
// std::cout << "TBROT" << std::endl << tball.getRotation() << endl;
// std::cout << "M3" << std::endl << m3 << std::endl;
// std::cout << "Q1" << std::endl << q1 << std::endl;
// std::cout << "M1" << std::endl << m1 << std::endl;
// m1.setRotate( tball.getRotation() );
m2.setTranslate( tball.getPosition() );
//std::cout << "Pos: " << tball.getPosition() << ", Rot: " << tball.getRotation() << std::endl;
// std::cout << tball.getRotation() << std::endl;
m1.mult( m2 );
// std::cerr << m1 << std::endl;
m1 = tball.getFullTrackballMatrix();
if(move_obj == true)
{
scene_trans->editSFMatrix()->setValue( m1 );
}
else
{
cam_trans->editSFMatrix()->setValue( m1 );
}
OSG::commitChangesAndClear();
win->render(rentravact);
if(dumpImg == true)
{
vpFBO->setTravMask(oldTravMask);
pTexBuffer ->setReadBack (false);
vpFBO->getFrameBufferObject()->setPostProcessOnDeactivate(false);
pImg->write("/tmp/test.png");
dumpImg = false;
}
if(dumpImg_RB == true)
{
pRenBuffer->getImage()->write("/tmp/test1.png");
dumpImg_RB = false;
win->subPortByObj(vpFBO_RB);
vpFBO_RB = NULL;
pRenBuffer = NULL;
win->runFrameExit();
// OSG::FieldContainerFactory::the()->dump();
}
// win->render(renact);
// std::cerr << "------------- AR START --------------" << std::endl;
// Thread::getCurrentChangeList()->dump();
}