MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / display

Function display

cpp/3_CUDA_Features/bindlessTexture/bindlessTexture.cpp:139–160  ·  view source on GitHub ↗

display results using OpenGL (called by GLUT)

Source from the content-addressed store, hash-verified

137
138// display results using OpenGL (called by GLUT)
139void 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
162void idle()
163{

Callers

nothing calls this directly

Calls 4

sdkStartTimerFunction · 0.85
sdkStopTimerFunction · 0.85
renderFunction · 0.70
computeFPSFunction · 0.70

Tested by

no test coverage detected