diff --git a/examples/osgautocapture/osgautocapture.cpp b/examples/osgautocapture/osgautocapture.cpp index 01bab4a82..715f68434 100644 --- a/examples/osgautocapture/osgautocapture.cpp +++ b/examples/osgautocapture/osgautocapture.cpp @@ -79,8 +79,10 @@ public: virtual void operator () (osg::RenderInfo& renderInfo) const { - #if !defined(OSG_GLES1_AVAILABLE) + #if !defined(OSG_GLES1_AVAILABLE) && !!defined(OSG_GLES1_AVAILABLE) glReadBuffer(_readBuffer); + #else + osg::notify(osg::NOTICE)<<"Error: GLES unable to do glReadBuffer"< lock(_mutex); diff --git a/include/osgViewer/api/X11/GraphicsWindowX11 b/include/osgViewer/api/X11/GraphicsWindowX11 index 068f79cea..d79733b16 100644 --- a/include/osgViewer/api/X11/GraphicsWindowX11 +++ b/include/osgViewer/api/X11/GraphicsWindowX11 @@ -53,7 +53,8 @@ class OSGVIEWER_EXPORT GraphicsWindowX11 : public osgViewer::GraphicsWindow _visualInfo(0), _context(0), #ifdef OSG_USE_EGL - _surface(0), + _eglDisplay(0), + _eglSurface(0), #endif _currentCursor(0), _initialized(false), @@ -204,7 +205,8 @@ class OSGVIEWER_EXPORT GraphicsWindowX11 : public osgViewer::GraphicsWindow Context _context; #ifdef OSG_USE_EGL - EGLSurface _surface; + EGLDisplay _eglDisplay; + EGLSurface _eglSurface; #endif Cursor _currentCursor; diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 19a67dcc2..87e8fc58a 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -54,6 +54,7 @@ #define GL_LUMINANCE8_ALPHA8 0x8045 #define GL_STENCIL_INDEX 0x1901 #define GL_RGBA8 0x8058 + #define GL_PACK_ROW_LENGTH 0x0D02 #endif using namespace osg; diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index cd0ffc465..2c812a401 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -625,10 +625,10 @@ void GraphicsWindowX11::init() #ifdef OSG_USE_EGL - EGLDisplay eglDisplay = eglGetDisplay((EGLNativeDisplayType)_display); + _eglDisplay = eglGetDisplay((EGLNativeDisplayType)_display); EGLint eglMajorVersion, eglMinorVersion; - if (!eglInitialize(eglDisplay, &eglMajorVersion, &eglMinorVersion)) + if (!eglInitialize(_eglDisplay, &eglMajorVersion, &eglMinorVersion)) { osg::notify(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() failed."<