| 140 | void initPixelBuffer(); |
| 141 | |
| 142 | void computeFPS() |
| 143 | { |
| 144 | frameCount++; |
| 145 | fpsCount++; |
| 146 | |
| 147 | if (fpsCount == fpsLimit) { |
| 148 | char fps[256]; |
| 149 | float ifps = 1.f / (sdkGetAverageTimerValue(&timer) / 1000.f); |
| 150 | sprintf(fps, "Volume Render: %3.1f fps", ifps); |
| 151 | |
| 152 | glutSetWindowTitle(fps); |
| 153 | fpsCount = 0; |
| 154 | |
| 155 | fpsLimit = (int)MAX(1.f, ifps); |
| 156 | sdkResetTimer(&timer); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | // render image using CUDA |
| 161 | void render() |
no test coverage detected