Comments (7)
Hi, Qt's openGL implementation needs to render from main thread. OSG's multithread starts multi-threading from the main thread into render Threads. These are not reconcilable...
from osgqt.
Hmm. That sucks. So there is absolutely no way to get multi-threaded OSG rendering with Qt?
from osgqt.
Is there a way to get the other operations (update and cull) to happen in other threads, keeping only the OpenGL drawing in the main thread?
from osgqt.
Sorry, but without refactoring osg there is no way it can be done. And refactoring osg is what got osgQt kicked out from main osg repo.
from osgqt.
Ok. That's unfortunate, indeed.
I appreciate your time!
from osgqt.
no problem, I needed this feature also but Qt's modern OpenGL handling makes this impossible without some refactoring either in Qt or in OSG...
from osgqt.
Correct me if I'm wrong but the needed refactoring under discussion is related to the Viewer class, parallelization of a render process, and the need to configure the automatically-generated threads with suitable contexts for rendering in the QT environment?
It looks like in certain applications a partially threaded render might be possible: Render to texture framebuffer(s) in a separate thread using a separate QT-created context and QT's makeCurrent() and doneCurrent() methods to do the context swaps.
Then the main QT thread can blit/compose/3D render from the texture framebuffers into the actual window. Does this sound plausible? It would at least prevent slow rendering from bogging down the main GUI thread.
The biggest potential pitfall I can think of would be the texture framebuffers not being available (because they are being redrawn) at an instant where the main QT thread wants a redraw. But I would imagine that just ignoring the paintGL() in that circumstance would recompose based on the prior output.
Make sense? Seem plausible?
from osgqt.
Related Issues (20)
- osgViewer::CompositeViewer missing? HOT 4
- example of Render To Texture when using QOpenGLWidget
- Will Qt QML/Quick programming be supported after osgQT? HOT 1
- What's the problem I change OSGRenderer inheritance osgViewer: : CompositeViewer to modify? HOT 1
- OsgQOpenGLWidget will not start properly after it is placed in the QT layout and setContentsMargins is set.
- how to make multithread work HOT 1
- new osgQt version HOT 2
- osgviewerQt crashed when press key F HOT 1
- Compiling with Visual Studio 2019 (16.10.0)
- Why use OSGEarth on OSGQt to display the earth will be black screen when the system switch back to the use of Win10 dormant state?
- osgViewer::ScreenCaptureHandler not working with osgQt
- Why is the scene black when using AMD Radeon R5 240 ?
- How to resolve the application crash when OSG integrates Silverlining on OsgQT?
- Qt 6 support HOT 13
- Question on the pkg-config file and its Libs field.
- hellow,how to support other threadmodel,not SingleThreaded
- `setViewpoint` doesn't work
- osg3.6.5 mingw32 build osgQt osgqopenglwidget not declared HOT 3
- How to import osgQt into project via vcpkg + cmake? HOT 1
- qt modules and the new qt opengl interface
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osgqt.