In this recipe, we are going to expand on the previous recipe and add hand tracking after recognizing a gesture. Moreover, we will also show the location of a hand in the screen overlying the depth frame data.
Create a project in Visual Studio and prepare it for working with OpenNI and NiTE using the Create a project in Visual Studio 2010 recipe in Chapter 2, OpenNI and C++, and then configure Visual Studio to use OpenGL using the Configuring Visual Studio 2010 to use OpenGL recipe in Chapter 3, Using Low-level Data.
gl_texturevariables on top of your source code, below the
#includelines, just as with the other examples we wrote using OpenGL and GLUT.
Add the following code right below them:
HandleStatus()from the first recipe of this chapter and paste it here. Also, copy
gl_IdleCallback()from the Initialize and prepare OpenGL recipe in Chapter 3, Using Low...