-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix bge.render.[get/set]Vsync. (#834)
Previously bge.render.getVsync wasn't returning the value set by setVsync when VSYNC_ADAPTIVE was used. It can be justified by the fact that adaptive is set by using a negative swap interval value but the GLX get function still returns a positive swap interval value and the flag GLX_LATE_SWAPS_TEAR_EXT meaning adaptive is enabled. In any case GLX could refuse a swap interval and the user should be able to do setVsync(getVsync()) with no change on the swap control. To achieve this behaviour RAS_ICanvas store the current swap control in a enum variable m_controlSwap, this variable is used in getter GetSwapControl used by bge.render.getVsync(). The setter is virtual and overloaded in each canvas implementation, they use a common table to find the swap interval associated to the swap control mode: RAS_ICanvas::swapInterval. Finally KX_PythonInit is using swap control enum value from RAS_ICanvas instead of the one from DNA to avoid conversions. Fix issue #820.
- Loading branch information
1 parent
e1b316a
commit dbff6df
Showing
10 changed files
with
57 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters