25 #include <osg/BufferObject>
27 #include "animation/WGEAnimationFrameTimer.h"
29 #include "WGEScreenCapture.h"
36 w->get().m_frames = 0;
37 w->get().m_framesLeft = 0;
68 w->get().m_framesLeft = frames;
74 return r->get().m_framesLeft;
89 osg::GraphicsContext* gc = renderInfo.getState()->getGraphicsContext();
94 GLenum pixelFormat = GL_RGB;
97 width = gc->getTraits()->width;
98 height = gc->getTraits()->height;
99 pixelFormat = gc->getTraits()->alpha ? GL_RGBA : GL_RGB;
107 #ifndef GL_ES_VERSION_2_0
108 glReadBuffer( GL_BACK );
142 osg::ref_ptr< osg::Image > image =
new osg::Image();
143 image->readPixels( 0, 0, width, height, pixelFormat, GL_UNSIGNED_BYTE );
165 w->get().m_frames = 0;