MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / DrawScene

Method DrawScene

Samples/NiUserSelection/SceneDrawer.cpp:55–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55void 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
92SceneDrawer *SceneDrawer::GetInstance()

Callers 1

StartSampleMethod · 0.80

Calls 3

glInitFunction · 0.85
opengles_initFunction · 0.70
glutDisplayFunction · 0.50

Tested by

no test coverage detected