tcblake
April 5th, 2008, 05:09 PM
Hi,
I'm new to graphics programming, so please bear with my ignorance.
I'm looking for a way, _using the GPU and OpenGL_, to change the color of a rendered pixel depending on _how many_ identical (x, y, z) point vertexes are sent to the GPU from the application.
This isn't ordinary image manipulation of course, but real-time vertex position data from an acquisition card. I need to set pixel color differently for those vertexes that have been read multiple times during a sample period from those read fewer times. For example, if I get 187000 samples during a frame, and 4000 of those happen to be at one point, it should be a different color than another point that only had (say) 200 samples contributing. The number of possible points is 2K x 2K integers.
This is very easy to do in the app, but for timing reasons I need to offload it to the graphics card (NVidia 8800). Is there a way to do this within OpenGL?
Note that this isn't blending, nor is it doable with the accumulation buffer, because the "accumulation" needs to happen before any rendering occurs.
Any hints would be most welcome.
Thanks in advance.
Thomas Blake
I'm new to graphics programming, so please bear with my ignorance.
I'm looking for a way, _using the GPU and OpenGL_, to change the color of a rendered pixel depending on _how many_ identical (x, y, z) point vertexes are sent to the GPU from the application.
This isn't ordinary image manipulation of course, but real-time vertex position data from an acquisition card. I need to set pixel color differently for those vertexes that have been read multiple times during a sample period from those read fewer times. For example, if I get 187000 samples during a frame, and 4000 of those happen to be at one point, it should be a different color than another point that only had (say) 200 samples contributing. The number of possible points is 2K x 2K integers.
This is very easy to do in the app, but for timing reasons I need to offload it to the graphics card (NVidia 8800). Is there a way to do this within OpenGL?
Note that this isn't blending, nor is it doable with the accumulation buffer, because the "accumulation" needs to happen before any rendering occurs.
Any hints would be most welcome.
Thanks in advance.
Thomas Blake