Hi Robert,
If Robert is still reading this thread, is this a known issue with a solution
or do I have to write a bug report?
Well the problem is most likely in the way you are using the OSG, or
perhaps using an OpenGL driver that doesn't support pbuffers, if you
want to write a bug report for your own app for you own purposes then
fine. As things stand it doesn't sound likely that it's an OSG bug.
I agree that a probable cause is that his driver or hardware does not
support pbuffers. However, what is a bit odd to me is this message in
his trace:
PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: Die
angeforderte Ressource wird bereits verwendet.
In english (using an on-line german to english translator) the message
is: "The requested resource is already in use" which seems to be related
to a threading issue.
If you really do think you've come across an OSG bug then the thing to
do is to write a small example, or modify one of the existing OSG
examples to reproduce the problem then post this. Then others can
test the problem out first hand. It could still be a bug in the what
you are trying to do, but others will be able to spot this and point
you at the problem.
As Oliver said, he has the same problem using the very simple an
self-contained example program that I sent him in my second mail. I
can't figure out where the problem is, overall considering that this
type of code hasn't ever failed to me (now I'm curious to know if I've
being doing something wrong for a long time). The program is very short,
so you may want to take a look.
For your convenience, I reproduce the code here with the modifications
that reproduce his problem :
#include <osg/Geode>
#include <osg/ShapeDrawable>
#include <osgViewer/Viewer>
#include <osgGA/TrackballManipulator>
#include <osgDB/WriteFile>
int main(int argc, char *argv[])
{
osg::ArgumentParser args(&argc, argv);
osgViewer::Viewer viewer(args);
osg::Camera *camera = viewer.getCamera();
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
osg::GraphicsContext::Traits;
traits->width = 512;
traits->height = 512;
traits->pbuffer = true;
traits->readDISPLAY();
osg::GraphicsContext *gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
camera->setGraphicsContext(gc);
camera->setDrawBuffer(GL_FRONT);
camera->setProjectionMatrixAsPerspective(22, 1, 0.1, 1000);
camera->setViewport(new osg::Viewport(0, 0, 512, 512));
osg::Geode *scene = new osg::Geode();
osg::Shape *sphere = new osg::Sphere(osg::Vec3(), 1);
scene->addDrawable(new osg::ShapeDrawable(sphere));
viewer.setSceneData(scene);
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
osg::Image *image = new osg::Image();
camera->attach(osg::Camera::COLOR_BUFFER0, image);
viewer.realize();
viewer.run();
}
Regards,
Juan
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org