I’m trying to make a Matlab wrapper to the volumer render in the SDK, I didn’t notice it before but it seems like the volume render uses 100% of the CPU, making it impossible to write any commands in Matlab at the same time, why is this?
I wrote that sample, and haven’t noticed it being particularly CPU intensive. What system/GPU/OS are you using?
I run Fedora 10 64-bit, CUDA 2.3, actually 2 out of my 4 processor cores run at 100% when I run the volume render
CPU is Intel Core 2 Quad 2.66 GHz, 8 GB of memory
GPU is Nvidia GTX 285, 1 GB of memory
Can anyone else verify this?
Actually, you’re right, this sample does use a lot of CPU time.
The reason seems to be that it was written using glDrawPixels() to display the image, which should be equivalent to drawing a textured quad, but appears to be falling back to a CPU path in this case (DrawPixels has a lot of processing options).
I modified it to use a texture for display (like most of the other GL samples do), and it now uses less than 10% CPU on my system. I’m attaching the new code (this should be in the next SDK release).
Thanks for pointing this out!
code not attached yet.
As soon as you do, I’ll update my Voxel Plancton code with it ;)