display results using OpenGL (called by GLUT)
| 137 | |
| 138 | // display results using OpenGL (called by GLUT) |
| 139 | void display() |
| 140 | { |
| 141 | sdkStartTimer(&timer); |
| 142 | |
| 143 | render(); |
| 144 | |
| 145 | // display results |
| 146 | glClear(GL_COLOR_BUFFER_BIT); |
| 147 | |
| 148 | // draw image from PBO |
| 149 | glDisable(GL_DEPTH_TEST); |
| 150 | glRasterPos2i(0, 0); |
| 151 | glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, pbo); |
| 152 | glDrawPixels(windowSize.x, windowSize.y, GL_RGBA, GL_UNSIGNED_BYTE, 0); |
| 153 | glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); |
| 154 | |
| 155 | glutSwapBuffers(); |
| 156 | glutReportErrors(); |
| 157 | |
| 158 | sdkStopTimer(&timer); |
| 159 | computeFPS(); |
| 160 | } |
| 161 | |
| 162 | void idle() |
| 163 | { |
nothing calls this directly
no test coverage detected