コード例 #1
0
osg::Group* createImageBackground(osg::Image* video)
{

	osgART::VideoLayer* _layer = new osgART::VideoLayer();
	
	_layer->setSize(*video);

	osgART::VideoGeode* _geode = new osgART::VideoGeode(osgART::VideoGeode::USE_TEXTURE_2D, video);

	addTexturedQuad(*_geode,video->s(),video->t());

	_layer->addChild(_geode);

	return _layer;
}
コード例 #2
0
osg::Node* createImageBillboard(osg::Image* video)
{
	osg::AutoTransform* node = new osg::AutoTransform;

	node->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_SCREEN);

	osgART::VideoGeode* _geode = new osgART::VideoGeode(osgART::VideoGeode::USE_TEXTURE_2D, video);
	
	addTexturedQuad(*_geode,video->s(),video->t());

	node->addChild(_geode);
	
	return node;

}