[osg-users] Problems with loading model in OSG 2.2

Ricky Tuanros at gmail.com
Wed Jul 2 05:29:31 PDT 2008

I still can't solve this problem:
Error: [screen #0] ChooseMatchingPixelFormat() - Unable to choose the
requested pixel format
I just loaded a simple model but the program run really slowly (in
debug mode), it's better in release mode.
I used osg1.2 and it run so fast, even in debug mode.
Please support me with this problem, is it because of that error?

My code is simply like this:
	#include <osg/PositionAttitudeTransform>
#include <osg/Group>
#include <osg/Node>
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>

int main()
	osg::ref_ptr<osg::Node> m_node = new osg::Node();
	osg::ref_ptr<osg::Group> root = new osg::Group();
	osgViewer::Viewer viewer;
	osg::Vec3 m_nodePosit;
	osg::ref_ptr<osg::PositionAttitudeTransform> nodeXform = new

	m_node = osgDB::readNodeFile("baitap.flt");


	nodeXform->setPosition( m_nodePosit );

	viewer.setSceneData( root.get() );

	return viewer.run();


More information about the osg-users mailing list