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

Function keyboard

cpp/3_CUDA_Features/bindlessTexture/bindlessTexture.cpp:170–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void keyboard(unsigned char key, int x, int y)
171{
172 switch (key) {
173 case 27:
174#if defined(__APPLE__) || defined(MACOSX)
175 exit(EXIT_SUCCESS);
176#else
177 glutDestroyWindow(glutGetWindow());
178 return;
179#endif
180 break;
181
182 case '=':
183 case '+':
184 lod += 0.25f;
185 break;
186
187 case '-':
188 lod -= 0.25f;
189 break;
190
191 case 'r':
192 randomizeAtlas();
193 break;
194
195 case ' ':
196 animate = !animate;
197 lod = 0.0f;
198 break;
199
200 default:
201 break;
202 }
203
204 glutPostRedisplay();
205}
206
207void reshape(int x, int y)
208{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected