Asynchronous read-back of pixel data using a Frame Buffer Object and two Pixel Buffer Objects

Author Kevin

It was my intention to write a full article on this new sample, but who am I kidding – I barely have enough time to write this simple little blog post. So, instead of just sitting on the sample and deluding myself that I will someday have enough free-time to write something substantial concerning it – I will just toss it out the door with a brief announcement of, “Come and get it!”

Recently, I was struggling with an OpenGL feature that required me to research faster ways of reading pixel data back to the CPU from the GPU where I could perform some post processing on it. Typically, you should try very hard to keep your post processing on the GPU instead trying to read it back across the bus, but in this case I wanted to fetch the pixel data back so I could load it into a WPF app and I had no choice. It must come back and as fast as possible.

After much research, I settled on a solution that does an off-screen rendering to a FBO (frame buffer object) and then uses two alternating PBOs (pixel buffer objects) to perform an asynchronous read-back to system memory via DMA transfers. The beauty of this approach is that it disables the blocking behavior which is typically associated with calling glReadPixels, and this is always the prime culprit when it comes to bad read-back performance for pixel data that is being shuttled back across the bus. If you’re researching something similar, I hope this research sample proves useful.

The sample targets the regular desktop version of OpenGL and was coded and tested in Visual Studio 2005 and 2008 on both Windows Xp and Windows 7.

3 Responses to “Asynchronous read-back of pixel data using a Frame Buffer Object and two Pixel Buffer Objects”

  1. Cassandra says:

    I read a lot of interesting content here. Probably you spend a lot of
    time writing, i know how to save you a lot of time, there
    is an online tool that creates readable, google friendly articles in seconds,
    just type in google – laranitas free content source

  2. Keith says:

    Your blog’s theme looks bad. You schould change it. Better design means a lot more conversions, faster load and greater confidence of visitors.
    This is something that can be useful for you, type in google:
    Juicklor’s templates source

  3. discounttop says:

    separate.(Other than the fact that satisfying my wife’s wishes is my motive for living obviously.) Opposite of that scenario if my young little spends all of her money on a cheap screwdriver set intended to last per month after Father’s Day, it has low value, it’s attractive useless nonetheless she the fact really severely considered it means it consists of a very high emotional value in my experience; and I would probably enjoy it for years (but in no way use it).Usefulness isn’t just about practical areas like tools, car accessories and so on..Ugly jewellery isn’t very useful, but a beautiful necklace is normally.Gift cards are often the most advantageous but will be viewed through majority as being a “cop out”.This is probably just a little unfair if you are trying to acquire a gift for any distant uncle you’re confident you know separate.(Other than the fact that satisfying my wife’s wishes is my motive for living obviously.) Opposite of that scenario if my young little spends all of her money on a cheap screwdriver set intended to last per month after Father’s Day, it has low value, it’s attractive useless nonetheless she the fact really severely considered it means it consists of a very high emotional value in my experience; and I would probably enjoy it for years (but in no way use it).Usefulness isn’t just about practical areas like tools, car accessories and so on..Ugly jewellery isn’t very useful, but a beautiful necklace is normally.Gift cards are often the most advantageous but will be viewed through majority as being a “cop out”.This is probably just a little unfair if you are trying to acquire a gift for any distant uncle you’re confident you know nothing concerning.A wise decision when giving a variety of card should be to suggest something to buy with the software.Perhaps something suits you at that store or possibly something you’d like to try.The recipient can take that into mind and (probably) decide to buy what they need, but more than you possess demonstrated that you have put quite a few thought for it.Thoughtfulness is actually a subset for the emotional bond but is definitely an important element of the fact that receiver together with onlookers use to judge a surprise.No matter what thought you’ve put in it, if they don’t think you’ve, then it will be a disappointment for them not directly.Spending lots of money on an issue can offset this, but it’s still perceived that you have treated it in the form of chore.When giving a gift try to describe why most people chose that one thing.Sometimes, of program, they just don’t like it, but that shouldn’t be viewed like a failure.The greatest gift is one that makes individuals really cheerful.This may be possible in the ways listed above, but to get that particular thing may resonate.You really need to know individual, whether it’s a really spouse, partner, child as well as parent as well as put a lot of thought involved with it.Whether it’s a really specially emblazoned picture of the car from your daughter and / or that ok’d Hank Aaron baseball there is a constant, ever thought you would get, you sense you have got the preferred present ever knowning that really should make all the giver content too.So, is it the reckoned that counts? Yes, of course it is normally, if you’ve actually severely considered it not to mention demonstrate that on the recipient.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.