Hi all.
I have a problem using VirtualTerrainBuilder when i try to generate a
terrain with textures. I have used the <new> osgdem source code as example
and i get the following error:
Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version test
failed, requires valid graphics context.
Scaling image 'model_L0_X0_Y0.dds' from (256,256) to (0,0)
Then it crashes.
I have done some tests and the class MyGraphicsContext provided in osgdem
never gets realized. In the code:
MyGraphicsContext() {
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
osg::GraphicsContext::Traits;
...
_gc = osg::GraphicsContext::createGraphicsContext(traits.get
());
if (!_gc)
{
osg::notify(osg::NOTICE)<<"Failed to create pbuffer,
failing back to normal graphics window."<<std::endl;
traits->pbuffer = false;
_gc = osg::GraphicsContext::createGraphicsContext(
traits.get());
}
if (_gc.valid())
{
_gc->realize();
_gc->makeCurrent();
std::cout<<"Realized window"<<std::endl;
}
}
When the constructor ends, the _gc.valid() stills false, so it never gets
realized. The old osgdem used the Producer::RenderSurface object to do the
same, but i would like to use the osg 2.0 approach in my next project.
I have not found a way to build my terrain with textures. With elevation
data i have no problem.
If you have any clue please let me know... Thanks to all in advance.
--
Enrique...
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/