| 53 | |
| 54 | |
| 55 | void SceneDrawer::DrawScene(UserTracker *pUserTrackerObj,int argc, char **argv,SampleManager *pSample, XnBool bShowLowConfidence) |
| 56 | { |
| 57 | m_pUserTrackerObj=pUserTrackerObj; |
| 58 | m_pSample=pSample; |
| 59 | m_bShowLowConfidence=bShowLowConfidence; |
| 60 | |
| 61 | #ifndef USE_GLES |
| 62 | glInit(&argc, argv); |
| 63 | #endif |
| 64 | |
| 65 | InitTexture(); |
| 66 | #ifndef USE_GLES |
| 67 | glutMainLoop(); |
| 68 | #else |
| 69 | if (!opengles_init(GL_WIN_SIZE_X, GL_WIN_SIZE_Y, &display, &surface, &context)) |
| 70 | { |
| 71 | printf("Error initializing opengles\n"); |
| 72 | ExitSample(EXIT_FAILURE); |
| 73 | } |
| 74 | |
| 75 | glDisable(GL_DEPTH_TEST); |
| 76 | glEnable(GL_TEXTURE_2D); |
| 77 | glEnableClientState(GL_VERTEX_ARRAY); |
| 78 | glDisableClientState(GL_COLOR_ARRAY); |
| 79 | |
| 80 | while (1) |
| 81 | { |
| 82 | glutDisplay(); |
| 83 | eglSwapBuffers(display, surface); |
| 84 | } |
| 85 | // we should never reach here! we have a while(1) above! |
| 86 | ExitSample(EXIT_SUCCESS); |
| 87 | |
| 88 | #endif |
| 89 | } |
| 90 | |
| 91 | |
| 92 | SceneDrawer *SceneDrawer::GetInstance() |
no test coverage detected