[osg-users] Save the image from computer shader
Hi, I am learning the osg example "osgcomputeshaders",I have a problem that how can I save the image(the result of a computation) from shaders to my folder ? I use the code : Code: while(!viewer.done()) { viewer.frame(); osgDB::writeImageFile(*(tex2D->getImage(0)),"abc.jpg"); } but it do not work,Could somebody give some suggestions ? Thank you! Cheers, liu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69019#69019 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vertex_array_object branch merged with master
robertosfield wrote: > Hi Tom, > > On 14 October 2016 at 20:58, tom spencer <> wrote: > > > I am getting a crash in the radeon driver in both kubuntu 16.04 and kubuntu > > 16.10. I have attached a back trace. > > > > Do you have a specific data file that provokes this crash? > > Do know what whether previous versions of the OSG worked fine with > this model? If so what is the most recent version that worked? > > Robert > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Hi, Robert Sorry for not pointing this out. The backtrace shows running osgviewer with dumptruck.osgt which is part of openscenegraph-data https://github.com/openscenegraph/OpenSceneGraph-Data Yes this was working prior to the vertex array merge. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69018#69018 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Master renders with OpenGL error on OSX
Raymond, try gDebugger (there is release for Mac OS too) or this apitrace. You can easely catch the OpenGL: error - with gDebugger it can show you the source code line producing the error On Sat, Oct 15, 2016 at 2:26 PM, Raymond de Vrieswrote: > Hi Robert, > > Ouch, typo, I meant to set the OSG_GL_ERROR_CHECKING properly... > > I am afraid this won't provide more info neither: > > MB:~ ray$ env | grep ONCE > OSG_GL_ERROR_CHECKING=ONCE_PER_ATTRIBUTE > MB:~ ray$ env | grep NOTIFY > OSG_NOTIFY_LEVEL=NOTICE > MBAngela-3:~ ray$ osgviewer cow.osg > OSG_VERTEX_BUFFER_HINT set to VERTEX_ARRAY_OBJECT > ViewerBase::configureAffinity() numProcessors=8 > databasePagers = 1 > _forceVertexArrayObject = 0 > _forceVertexBufferObject = 0 > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > Warning: detected OpenGL error 'invalid operation' at start of > State::apply() > > When I have more time, I will dig into it more. Do you have other > suggestions in the mean time? > > Cheers > Raymond > > > > > > On 15-10-2016 13:29, Robert Osfield wrote: > >> Hi Raymond, >> >> Unfortunately the output doesn't yet provide anything clearer to what >> might be amiss. >> >> Could you try the test with the env OSG_GL_ERROR_CHECKING set to >> ONCE_PER_ATTRIBUTE, setting the env var to OSG_GL_ERROR_CHECKINGas >> your specified will not change the setting, so will default to >> ONCE_PER_FRAME. >> >> Robert. >> >> On 15 October 2016 at 09:13, Raymond de Vries wrote: >> >>> Hi, >>> >>> I did another test and the output with default settings is (NOTICE): >>> >>> ViewerBase::configureAffinity() numProcessors=8 >>>databasePagers = 1 >>> _forceVertexArrayObject = 0 >>> _forceVertexBufferObject = 0 >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> >>> >>> Setting OSG_GL_ERROR_CHECKING=OSG_GL_ERROR_CHECKING does not make a >>> difference in output. >>> >>> Setting OSG_NOTIFY_LEVEL to INFO reveals this part that might be >>> interesting: >>> >>> Created new 0x7fdf1b714510 TextureObject, _numOfTextureObjects 1 >>> OpenGL extension '' is not supported. >>> RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b712660 >>> Setting up osg::Camera::FRAME_BUFFER >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> ShaderComposer::~ShaderComposer() 0x7fdf1b40dd80 >>> OpenGL extension '' is not supported. >>> RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b40ecd0 >>> Setting up osg::Camera::FRAME_BUFFER >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> >>> Cheers, hth, >>> Raymond >>> >>> >>> >>> >>> >>> On 14-10-2016 13:51, Raymond de Vries wrote: >>> Hi Robert, Yes, indeed, that's the OpenGL error. I have build the same version on Windows (nvidia card) and no such error so I am not sure of course if it has to do with OSX or not. The last version that I checked was 3.5.4 and that one doesn't produce the errors. Indeed, I tested it explicitly because of the VAO changes. Later, I will produce more results and post them. Regards, Raymond On 10/14/2016 1:35 PM, Robert Osfield wrote: > Hi Raymond, > > Thanks for the logs, unfortunately the debug logs actually make it > more difficult to spot the actual errors. The only error I spotted > was: > > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > > Is this the error you are thinking of? > > Could you set the OSG_NOTIFY_LEVEL back to NOTICE and the env > OSG_GL_ERROR_CHECKING env var to ONCE_PER_ATTRIBUTE > > This hopefully will enable us to home in a bit more closely to what > might be causing the GL error. > > Another useful bit of information is the last OSG version that doesn't
Re: [osg-users] Master renders with OpenGL error on OSX
Hi Robert, Ouch, typo, I meant to set the OSG_GL_ERROR_CHECKING properly... I am afraid this won't provide more info neither: MB:~ ray$ env | grep ONCE OSG_GL_ERROR_CHECKING=ONCE_PER_ATTRIBUTE MB:~ ray$ env | grep NOTIFY OSG_NOTIFY_LEVEL=NOTICE MBAngela-3:~ ray$ osgviewer cow.osg OSG_VERTEX_BUFFER_HINT set to VERTEX_ARRAY_OBJECT ViewerBase::configureAffinity() numProcessors=8 databasePagers = 1 _forceVertexArrayObject = 0 _forceVertexBufferObject = 0 Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() Warning: detected OpenGL error 'invalid operation' at start of State::apply() When I have more time, I will dig into it more. Do you have other suggestions in the mean time? Cheers Raymond On 15-10-2016 13:29, Robert Osfield wrote: Hi Raymond, Unfortunately the output doesn't yet provide anything clearer to what might be amiss. Could you try the test with the env OSG_GL_ERROR_CHECKING set to ONCE_PER_ATTRIBUTE, setting the env var to OSG_GL_ERROR_CHECKINGas your specified will not change the setting, so will default to ONCE_PER_FRAME. Robert. On 15 October 2016 at 09:13, Raymond de Vrieswrote: Hi, I did another test and the output with default settings is (NOTICE): ViewerBase::configureAffinity() numProcessors=8 databasePagers = 1 _forceVertexArrayObject = 0 _forceVertexBufferObject = 0 Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Setting OSG_GL_ERROR_CHECKING=OSG_GL_ERROR_CHECKING does not make a difference in output. Setting OSG_NOTIFY_LEVEL to INFO reveals this part that might be interesting: Created new 0x7fdf1b714510 TextureObject, _numOfTextureObjects 1 OpenGL extension '' is not supported. RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b712660 Setting up osg::Camera::FRAME_BUFFER Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) ShaderComposer::~ShaderComposer() 0x7fdf1b40dd80 OpenGL extension '' is not supported. RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b40ecd0 Setting up osg::Camera::FRAME_BUFFER Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Cheers, hth, Raymond On 14-10-2016 13:51, Raymond de Vries wrote: Hi Robert, Yes, indeed, that's the OpenGL error. I have build the same version on Windows (nvidia card) and no such error so I am not sure of course if it has to do with OSX or not. The last version that I checked was 3.5.4 and that one doesn't produce the errors. Indeed, I tested it explicitly because of the VAO changes. Later, I will produce more results and post them. Regards, Raymond On 10/14/2016 1:35 PM, Robert Osfield wrote: Hi Raymond, Thanks for the logs, unfortunately the debug logs actually make it more difficult to spot the actual errors. The only error I spotted was: Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Is this the error you are thinking of? Could you set the OSG_NOTIFY_LEVEL back to NOTICE and the env OSG_GL_ERROR_CHECKING env var to ONCE_PER_ATTRIBUTE This hopefully will enable us to home in a bit more closely to what might be causing the GL error. Another useful bit of information is the last OSG version that doesn't report the above error on our system. It could be that the cause of the GL error precedes the VAO work. Cheers, Robert. On 14 October 2016 at 11:13, Raymond de Vries wrote: Hi Robert, I just tried a build from this mornings git master on my Mac book (up to date OSX and dependencies) and both the default and VAO paths result in OpenGL errors. I have attached 2 (stripped) logs which I created after I increased the notify level. Rendering results of cow, cessna and some other models look ok. I was going to try gdebugger but that one is not available anymore?! If you have some hints to produce more info I am happy to test some more. Cheers Raymond ___ osg-users mailing list
Re: [osg-users] Master renders with OpenGL error on OSX
Hi Raymond, Unfortunately the output doesn't yet provide anything clearer to what might be amiss. Could you try the test with the env OSG_GL_ERROR_CHECKING set to ONCE_PER_ATTRIBUTE, setting the env var to OSG_GL_ERROR_CHECKINGas your specified will not change the setting, so will default to ONCE_PER_FRAME. Robert. On 15 October 2016 at 09:13, Raymond de Vrieswrote: > Hi, > > I did another test and the output with default settings is (NOTICE): > > ViewerBase::configureAffinity() numProcessors=8 > databasePagers = 1 > _forceVertexArrayObject = 0 > _forceVertexBufferObject = 0 > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > > > Setting OSG_GL_ERROR_CHECKING=OSG_GL_ERROR_CHECKING does not make a > difference in output. > > Setting OSG_NOTIFY_LEVEL to INFO reveals this part that might be > interesting: > > Created new 0x7fdf1b714510 TextureObject, _numOfTextureObjects 1 > OpenGL extension '' is not supported. > RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b712660 > Setting up osg::Camera::FRAME_BUFFER > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > ShaderComposer::~ShaderComposer() 0x7fdf1b40dd80 > OpenGL extension '' is not supported. > RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b40ecd0 > Setting up osg::Camera::FRAME_BUFFER > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > Warning: detected OpenGL error 'invalid operation' at after > RenderBin::draw(..) > > Cheers, hth, > Raymond > > > > > > On 14-10-2016 13:51, Raymond de Vries wrote: >> >> Hi Robert, >> >> Yes, indeed, that's the OpenGL error. I have build the same version on >> Windows (nvidia card) and no such error so I am not sure of course if it has >> to do with OSX or not. >> >> The last version that I checked was 3.5.4 and that one doesn't produce the >> errors. Indeed, I tested it explicitly because of the VAO changes. >> >> Later, I will produce more results and post them. >> >> Regards, >> Raymond >> >> >> >> >> On 10/14/2016 1:35 PM, Robert Osfield wrote: >>> >>> Hi Raymond, >>> >>> Thanks for the logs, unfortunately the debug logs actually make it >>> more difficult to spot the actual errors. The only error I spotted >>> was: >>> >>> Warning: detected OpenGL error 'invalid operation' at after >>> RenderBin::draw(..) >>> >>> Is this the error you are thinking of? >>> >>> Could you set the OSG_NOTIFY_LEVEL back to NOTICE and the env >>> OSG_GL_ERROR_CHECKING env var to ONCE_PER_ATTRIBUTE >>> >>> This hopefully will enable us to home in a bit more closely to what >>> might be causing the GL error. >>> >>> Another useful bit of information is the last OSG version that doesn't >>> report the above error on our system. It could be that the cause of >>> the GL error precedes the VAO work. >>> >>> Cheers, >>> Robert. >>> >>> On 14 October 2016 at 11:13, Raymond de Vries wrote: Hi Robert, I just tried a build from this mornings git master on my Mac book (up to date OSX and dependencies) and both the default and VAO paths result in OpenGL errors. I have attached 2 (stripped) logs which I created after I increased the notify level. Rendering results of cow, cessna and some other models look ok. I was going to try gdebugger but that one is not available anymore?! If you have some hints to produce more info I am happy to test some more. Cheers Raymond ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> ___ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vertex_array_object branch merged with master
Hi Tom, On 14 October 2016 at 20:58, tom spencerwrote: > I am getting a crash in the radeon driver in both kubuntu 16.04 and kubuntu > 16.10. I have attached a back trace. Do you have a specific data file that provokes this crash? Do know what whether previous versions of the OSG worked fine with this model? If so what is the most recent version that worked? Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Master renders with OpenGL error on OSX
Hi, I did another test and the output with default settings is (NOTICE): ViewerBase::configureAffinity() numProcessors=8 databasePagers = 1 _forceVertexArrayObject = 0 _forceVertexBufferObject = 0 Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Setting OSG_GL_ERROR_CHECKING=OSG_GL_ERROR_CHECKING does not make a difference in output. Setting OSG_NOTIFY_LEVEL to INFO reveals this part that might be interesting: Created new 0x7fdf1b714510 TextureObject, _numOfTextureObjects 1 OpenGL extension '' is not supported. RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b712660 Setting up osg::Camera::FRAME_BUFFER Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) ShaderComposer::~ShaderComposer() 0x7fdf1b40dd80 OpenGL extension '' is not supported. RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) 0x7fdf1b40ecd0 Setting up osg::Camera::FRAME_BUFFER Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Cheers, hth, Raymond On 14-10-2016 13:51, Raymond de Vries wrote: Hi Robert, Yes, indeed, that's the OpenGL error. I have build the same version on Windows (nvidia card) and no such error so I am not sure of course if it has to do with OSX or not. The last version that I checked was 3.5.4 and that one doesn't produce the errors. Indeed, I tested it explicitly because of the VAO changes. Later, I will produce more results and post them. Regards, Raymond On 10/14/2016 1:35 PM, Robert Osfield wrote: Hi Raymond, Thanks for the logs, unfortunately the debug logs actually make it more difficult to spot the actual errors. The only error I spotted was: Warning: detected OpenGL error 'invalid operation' at after RenderBin::draw(..) Is this the error you are thinking of? Could you set the OSG_NOTIFY_LEVEL back to NOTICE and the env OSG_GL_ERROR_CHECKING env var to ONCE_PER_ATTRIBUTE This hopefully will enable us to home in a bit more closely to what might be causing the GL error. Another useful bit of information is the last OSG version that doesn't report the above error on our system. It could be that the cause of the GL error precedes the VAO work. Cheers, Robert. On 14 October 2016 at 11:13, Raymond de Vrieswrote: Hi Robert, I just tried a build from this mornings git master on my Mac book (up to date OSX and dependencies) and both the default and VAO paths result in OpenGL errors. I have attached 2 (stripped) logs which I created after I increased the notify level. Rendering results of cow, cessna and some other models look ok. I was going to try gdebugger but that one is not available anymore?! If you have some hints to produce more info I am happy to test some more. Cheers Raymond ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org