Coder Social home page Coder Social logo

Comments (7)

mathieu avatar mathieu commented on June 9, 2024

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.

villains avatar villains commented on June 9, 2024

Hmm. That sucks. So there is absolutely no way to get multi-threaded OSG rendering with Qt?

from osgqt.

villains avatar villains commented on June 9, 2024

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.

mathieu avatar mathieu commented on June 9, 2024

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.

villains avatar villains commented on June 9, 2024

Ok. That's unfortunate, indeed.

I appreciate your time!

from osgqt.

mathieu avatar mathieu commented on June 9, 2024

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.

sdh4 avatar sdh4 commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.