O'Reilly logo

OpenNI Cookbook by Soroush Falahati

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Visual Studio 2010 to use OpenGL

As we need to show the result of the color, IR, and/or depth sensors to the user, we must use an interface. Here we choose to use OpenGL to show data to the user because it is multiplatformed and you can convert your code to other platforms easily later on, if you want to. OpenNI's samples use OpenGL too. But you can also go for DirectX or other types of interfaces capable of displaying 2D images, such as Graphics Device Interface (GDI).

Follow this recipe to add OpenGL to a Microsoft Visual Studio 2010 C++ project.

Getting ready

Create and configure a project using the Creating a project in Visual Studio 2010 recipe of Chapter 2, Open NI and C++.

In this recipe we used the OpenGL Utility Toolkit to make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required