the OSG Vista includes four threading models that can be set using Setthreadingmodel, with different threads
The model shows different rendering efficiency and threading control characteristics when the simulation loop is running. Typically, these four threads are
Features are as follows:
singlethreaded: Single threading model. OSG does not create any new threads to complete the filtering and rendering of the scene, as
And it will not do any useful to improve rendering efficiency. It is suitable for any configuration under use.
culldrawthreadpercontext: OSG will be created for each graphics device context (Graphicscontext)
A graphical thread to implement parallel rendering work. If there is more than one CPU, then the system will attempt to divide the thread
Do not run on different CPUs, but force all threads to be synchronized before each frame ends.
drawthreadpercontext: This thread model also creates threads for each graphicscontext and assigns
to a different CPU. It is important to note that this mode will be opened before all threads in the current frame have finished working.
Start the next frame.
cullthreadpercameradrawthreadpercontext: This thread model will be for each graphicscontext
And each camera creates a thread, this mode also does not wait for the previous render to end, but instead returns the emulation loop and
Execute the FRAME function at the beginning of the session. If you use a four-core or even higher system configuration, using this thread model will
Maximize the processing power of multiple CPUs.
The two types of Drawthreadpercontext and Cullthreadpercameradrawthreadpercontext are equally
Compared to a more efficient threading model for multi-CPU systems, the application of Culldrawthreadpercontext
The singlethreaded mode runs stably on single-core and low-profile systems.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
OSG four threading models (excerpt from the longest frame of the array)