缺少类似于Win32的
static osg::WindowingSystemInterfaceProxy<Win32WindowingSystem> s_proxy_Win32WindowingSystem("Win32");
osg/GraphicsContext
template<class T>
struct WindowingSystemInterfaceProxy
{
WindowingSystemInterfaceProxy(const std::string& name)
{
_wsi = new T;
_wsi->setName(name);
osg::GraphicsContext::getWindowingSystemInterfaces()->addWindowingSystemInterface(_wsi.get());
}
~WindowingSystemInterfaceProxy()
{
osg::GraphicsContext::getWindowingSystemInterfaces()->removeWindowingSystemInterface(_wsi.get());
}
osg::ref_ptr<T> _wsi;
};
可以自定义一个接口
class EmbeddedWindowingSystem : public osg::GraphicsContext::WindowingSystemInterface
{
public:
osg::GraphicsContext *createGraphicsContext(osg::GraphicsContext::Traits *traits) override {
osg::ref_ptr<osgViewer::GraphicsW