DXUT changing when frames are rendered

Started by
-1 comments, last by theycallhimSeeD 17 years, 5 months ago
I am using my GPU/pixel shaders to calculate PI (I'll talk about that below if you are interested). But in calculating PI I only use a few frames. So what I really is to be able to control when a frame is rendered. The code that I am working off of uses DXUT and I would rather not switch. Is there anyway to take over control of when frames are rendered in DXUT or should I switch to something else? If I should switch what should I switch to? How I calculate PI if you happen to care. So I make the screen 1024 x 1024 pixels. Then using a pixel shader make a texture where each pixel's color value represents the value in a series that converges to PI (http://functions.wolfram.com/Constants/Pi/06/01/). After I have the texture with all of the values I add up all of the values using a pixel shader (takes about 10 frames) then the one color left when converted to a number represents PI! The when I have the CPU calculate PI using the same series both my CPU and GPU get very close to the same number. Although my GPU takes about 25% longer. The series that I am using is (PI^2)/6 = Sum of 1/(k^2) from 1 to infinity. I am representing each pixel as a floating point number using the IEEE standard (32 bits in a pixel 32 bits in a float!)

This topic is closed to new replies.

Advertisement