View Full Version : read buffer crashes in separate thread (nvidia)
01-27-2004, 03:17 AM
Now here is something weird. If am reading the buffer (either front or back) using glReadPixels in a main thread everything is OK. If I read the buffer in a separate thread, it crashes immediately at this function. An older NVidia driver 4191 did not crash, but only newer (from 4496 onwards) crash. Is this an NVidia problem? Or should reading buffer only be done in the main thread program? Really weird...
01-27-2004, 04:48 AM
A gl context can only be current to one thread.
Why are you doing that anyway? Read pixels will block, there's no way around that.
01-27-2004, 10:39 AM
I think he believes that he can ReadPixels in one thread, and keep rendering in another thread.
Alas, that's not true. A context can only be current in a single thread at a time, and another thread trying to make the context current will (typically) block until it can make the context current, so the first thread has to first give up the context.
If you want asynchronous pixel reading, NVIDIA has a current extension called NV_pixel_data_range (or something very similar).
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.