display results using OpenGL (called by GLUT)
| 150 | |
| 151 | // display results using OpenGL (called by GLUT) |
| 152 | void display() |
| 153 | { |
| 154 | sdkStartTimer(&timer); |
| 155 | |
| 156 | render(); |
| 157 | |
| 158 | // display results |
| 159 | glClear(GL_COLOR_BUFFER_BIT); |
| 160 | |
| 161 | // draw image from PBO |
| 162 | glDisable(GL_DEPTH_TEST); |
| 163 | glRasterPos2i(0, 0); |
| 164 | glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, pbo); |
| 165 | glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_BYTE, 0); |
| 166 | glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); |
| 167 | |
| 168 | glutSwapBuffers(); |
| 169 | glutReportErrors(); |
| 170 | |
| 171 | sdkStopTimer(&timer); |
| 172 | computeFPS(); |
| 173 | } |
| 174 | |
| 175 | void idle() |
| 176 | { |
nothing calls this directly
no test coverage detected