sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
(no source file, everything inside header)
class SGRBaseSyncer;
part of SGEXTN module SG_RI
base class of syncers for custom renderers
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGRBaseSyncer.h›
CMake target for BuildLah: SGEXTN::SG_RI
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
virtual void sync(SGRBaseRenderer* renderControl) = 0;
SGRBaseSyncer provides a base class to build syncers for SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderers on top of. All syncers must inherit this class and implement all pure virtual functions provided in this class. Creating SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ renderers is the only way in SGEXTN to use custom shaders. Since most of the logic in custom renderers run on a separate thread, it is not allowed to access objects not owned by the renderer from inside the renderer, or to access objects owned by the renderer from outside. Syncers provide a function where it is safe to exchange data between 2 threads.
SG - RI ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ internally uses QRhi.
Use this function to transfer data from the main thread to the custom renderer renderControl. Typically this involves copying data from static or main thread variables into variables owned by the renderer.
Transferring data across the main thread and the custom renderer thread anywhere else is undefined behaviour. Even reading the data elsewhere causes undefined behaviour.
©2025 05524F.sg (Singapore)