This fixes error messages being generated of the form:
AL lib: (WW) alSetError: Error generated on context 0x801cf8800, code 0xa003
This is caused by alSourceUnqueueBuffers being called without first checking whether processed buffers are available using alGetSourcei.
Fixes#180
Allows accessing `base` object and several other builtins from the ShowBaseGlobal module.
It doesn't bother with builtins that are available as members of the base object such as `render` and `loader`.
Fixes#182
This is required to make the test suite run with pipelining enabled.
It's necessary to let the draw thread do these tasks because that's where the OpenGL context is bound to. However, we need to let it access the data from the calling thread, so we have to temporarily change the pipeline stage of the draw thread.
I'm not really happy about this solution; it would be better to temporarily make the context current to the app thread, but we need a window for that, which we don't currently require to be passed into that method.
This deadlock happens when another thread holds a cycler lock and then attempts to call Pipeline::remove_cycler() while Pipeline::cycle() is running on the main thread.
The fix for this problem is threefold:
* Allow remove_cycler (and add_cycler) to be called while a cycle is in progress, by introducing a second lock
* Let cycle() not block if a dirty cycler can't be locked, instead trying other cyclers first
* Adding a way to let remove_cycler() check whether a cycler is currently in use by the main thread, and yielding if so
More information is on https://github.com/panda3d/panda3d/issues/217Fixes#217 (also see LP 1186880)
This changes behaviour for sRGB textures, which weren't previously converting to the correct color space.
Also add unit tests for storing to PNMImage.
Closes: #212
- Do not take into accound SBS if it is not enabled
- Always return value for getSize()
- Properly handle SBS for window-events
- Redo positioning of aspect2d(p) markers exactly as
they are created when adjusting aspect ratio
Signed-off-by: deflected <deflected@users.noreply.github.com>
This introduces AsyncFuture as a new base class of AsyncTask. It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).
AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it. As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().
Note that AsyncFuture is intended to be used *once*; it cannot be used more than once. As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.