[osg-users] Issue Subclassing GraphicsWindowX11

Cary, Karl A. KARL.A.CARY at leidos.com
Wed May 27 07:32:40 PDT 2015

I need to subclass the GraphicsWindowX11 class in order to provide a custom swapBuffersImplementation. However, when I do this I then get a really random error in the middle of one of my enumerations (expected identifier before numeric constant). It happens when I include osgViewer/api/X11/GraphicsWindowX11, which I have to include in order to subclass GraphicsWindowX11. If not I am told 'expected class name before {'. As for the enumeration, it happens on the definition of an enumeration value called 'None' (NOTE: the value is called None, not the enumeration). It is a 3rd party header/library so it cannot be changed. Any idea what is going on? Or is there a different way I need to be including/subclassing/declaring GraphicsWindowX11? Thank you.

#include <osgViewer/GraphicsWindow>
#include <osgViewer/api/X11/GraphicsWindowX11>

class MyWindow : public osgViewer::GraphicsWindowX11
		MyWindow(osg::GraphicsContext::Traits* traits):
			osgViewer::GraphicsWindowX11(traits) {}

		virtual void swapBuffersImplementation();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5625 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150527/3c09ec94/attachment-0002.bin>

More information about the osg-users mailing list