[osg-users] Capture image on iOS get black image

duc nguyen osgforum at tevs.eu
Thu Dec 29 01:44:29 PST 2016


Dear Raymond,

Yes, your right. But I am mentioning about glReadPixels, not glReadBuffer()

I've tested using SnapImageDrawCallback class on Windows OS and it done to create a screenshot of osgviewer, but on iOS it still return black image 


reedev wrote:
> Dear Duc,
> 
> If you read your own first mail with the code snippet you pasted:
> 
>     virtual void operator () (osg::RenderInfo& renderInfo) const 
>     { 
> #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) 
>         glReadBuffer(_readBuffer); 
> #else 
>         osg::notify(osg::NOTICE)<<"Error: GLES unable to do glReadBuffer"<<std::endl; 
> #endif 
> 
> I guess that's clear, right?
> 
> Cheers
> Raymond
> 
> 


Cheers
Duc

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69795#69795








More information about the osg-users mailing list