mirror of
https://github.com/adamdruppe/arsd.git
synced 2025-04-26 21:30:12 +03:00
note about buffer swapping
This commit is contained in:
parent
4947ea9efd
commit
eaf60b4101
1 changed files with 10 additions and 3 deletions
|
@ -3272,11 +3272,18 @@ class SimpleWindow : CapableOfHandlingNativeEvent, CapableOfBeingDrawnUpon {
|
||||||
|
|
||||||
/++
|
/++
|
||||||
simpledisplay always uses double buffering, usually automatically. This
|
simpledisplay always uses double buffering, usually automatically. This
|
||||||
manually swaps the OpenGL buffers.
|
manually swaps the OpenGL buffers. You should only use this if you are NOT
|
||||||
|
using the [redrawOpenGlScene] delegate.
|
||||||
|
|
||||||
|
|
||||||
You should not need to call this yourself because simpledisplay will do it
|
You must not this yourself if you use [redrawOpenGlScene] because simpledisplay will do it
|
||||||
for you after calling your `redrawOpenGlScene`.
|
for you after calling your `redrawOpenGlScene`. Please note that once you swap
|
||||||
|
buffers, the contents become undefined - the implementation, in the OpenGL driver
|
||||||
|
or the desktop compositor, may not actually just swap two buffers. The back buffer's
|
||||||
|
contents are $(B undefined) after calling this function.
|
||||||
|
|
||||||
|
See: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-swapbuffers
|
||||||
|
and https://linux.die.net/man/3/glxswapbuffers
|
||||||
|
|
||||||
Remember that this may throw an exception, which you can catch in a multithreaded
|
Remember that this may throw an exception, which you can catch in a multithreaded
|
||||||
application to keep your thread from dying from an unhandled exception.
|
application to keep your thread from dying from an unhandled exception.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue