Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to call getWindowingSystemInterface() in a browser? #1231

Open
HQidea opened this issue May 19, 2023 · 0 comments
Open

Is it possible to call getWindowingSystemInterface() in a browser? #1231

HQidea opened this issue May 19, 2023 · 0 comments

Comments

@HQidea
Copy link

HQidea commented May 19, 2023

Hey guys, I'm new to OSG. I added a getWindowingSystemInterface call in the osgemscripten.h's setupRendering function.

osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();

void setupRendering()
{
// Create OpenSceneGraph viewer.
mViewer = new osgViewer::Viewer;
// Use single thread: CRITICAL for Emscripten.
mViewer->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
// Create manipulator: CRITICAL for Emscripten.
mViewer->setCameraManipulator(new osgGA::TrackballManipulator);
}

After building and opening in the browser, there is a warning in the console:

OSG/I OSG/W Warning: GraphicsContext::WindowingSystemInterfaces::getWindowingSystemInterface() failed, no interfaces available.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant