no pic
/*****************************************************************************
* *
* OpenNI 1.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* *
* This file is part of OpenNI. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
* *
*****************************************************************************/
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include <XnOS.h>
/*
#if (XN_PLATFORM == XN_PLATFORM_MACOSX)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
*/
#include <math.h>
#include <XnCppWrapper.h>
using namespace xn; ///?
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#define SAMPLE_XML_PATH "/root/Desktop/OpenNI-master/Data/SamplesConfig.xml"
#define GL_WIN_SIZE_X 1280
#define GL_WIN_SIZE_Y 1024
#define DISPLAY_MODE_OVERLAY 1
#define DISPLAY_MODE_DEPTH 2
#define DISPLAY_MODE_IMAGE 3
#define DEFAULT_DISPLAY_MODE DISPLAY_MODE_DEPTH
//---------------------------------------------------------------------------
// Globals
//---------------------------------------------------------------------------
float* g_pDepthHist;
XnRGB24Pixel* g_pTexMap = NULL;
unsigned int g_nTexMapX = 0;
unsigned int g_nTexMapY = 0;
XnDepthPixel g_nZRes;
unsigned int g_nViewState = DEFAULT_DISPLAY_MODE;
Context g_context;
ScriptNode g_scriptNode;
DepthGenerator g_depth;
ImageGenerator g_image;
DepthMetaData g_depthMD; // <---- MD ==> [Meta Data]
ImageMetaData g_imageMD;
//---------------------------------------------------------------------------
// Code
//---------------------------------------------------------------------------
/*
void glutIdle (void)
{
// Display the frame
glutPostRedisplay();
}
*/
void glutDisplay (void)
{
XnStatus rc = XN_STATUS_OK;
// Read a new frame
rc = g_context.WaitAnyUpdateAll();
if (rc != XN_STATUS_OK)
{
printf("Read failed: %s\n", xnGetStatusString(rc));
return;
}
g_depth.GetMetaData(g_depthMD); //<-- raw depth data!!
g_image.GetMetaData(g_imageMD);
const XnDepthPixel* pDepth = g_depthMD.Data();
// Copied from SimpleViewer
// Clear the OpenGL buffers
// glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //<--glClear ==> [OpenGL Clear]
// Setup the OpenGL viewpoint
/* glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0, GL_WIN_SIZE_X, GL_WIN_SIZE_Y, 0, -1.0, 1.0); //<-- set the screen output size ; WIN ==> [screen window]
*/
/***********>begin<*********get the raw Depth data*****************************/
// Calculate the accumulative histogram (the yellow display...)
xnOSMemSet(g_pDepthHist, 0, g_nZRes*sizeof(float)); //<-- the data type is float
double minDepth = 2047 ; //<-- myParameter,2047 is larger(farther) to the camera that more easy to calulate
double mytmp = 0;
XnInt x_min = 640, y_min = 517; // the init point is on the center of the monitor screen.
unsigned int nNumberOfPoints = 0;
for (XnUInt y = 0; y < g_depthMD.YRes(); ++y) // <-- Res ==> [Resolution]
{
for (XnUInt x = 0; x < g_depthMD.XRes(); ++x, ++pDepth) ////###########y < g_depthMD.[X|Y]Res()
{
if (*pDepth != 0) // <-- ##! *pDepth point to the current pixel's z-coorditate depth
{
g_pDepthHist[*pDepth]++; // !here is the depth arry >g_pDepthHist[*pDepth]<
nNumberOfPoints++; //<--pixel sum counter
if(*pDepth > 0 && *pDepth < 2047 && *pDepth < minDepth ){
minDepth = *pDepth;
x_min = x; // record the most near pixel's x-y coordinate
y_min = y;
mytmp = 0.1236 * tan(minDepth / 2842.5 + 1.1863);
}
}
}
//output the distance data to the terminal
if(mytmp > 0){
printf("%lf\t",mytmp);//0.1236 * tan(minDepth / 2842.5 + 1.1863)
}
}
/*******>end<********get the raw Depth data**********************************/
for (int nIndex=1; nIndex<g_nZRes; nIndex++)
{
g_pDepthHist[nIndex] += g_pDepthHist[nIndex-1];
}
if (nNumberOfPoints)
{
for (int nIndex=1; nIndex<g_nZRes; nIndex++)
{
g_pDepthHist[nIndex] = (unsigned int)(256 * (1.0f - (g_pDepthHist[nIndex] / nNumberOfPoints))); // ??may be color trans??
}
}
xnOSMemSet(g_pTexMap, 0, g_nTexMapX*g_nTexMapY*sizeof(XnRGB24Pixel)); //<-- X*Y*sizeof()
// check if we need to draw image frame to texture
if (g_nViewState == DISPLAY_MODE_OVERLAY ||
g_nViewState == DISPLAY_MODE_IMAGE)
{
const XnRGB24Pixel* pImageRow = g_imageMD.RGB24Data();
XnRGB24Pixel* pTexRow = g_pTexMap + g_imageMD.YOffset() * g_nTexMapX;
for (XnUInt y = 0; y < g_imageMD.YRes(); ++y)
{
const XnRGB24Pixel* pImage = pImageRow;
XnRGB24Pixel* pTex = pTexRow + g_imageMD.XOffset();
for (XnUInt x = 0; x < g_imageMD.XRes(); ++x, ++pImage, ++pTex)
{
*pTex = *pImage;
}
pImageRow += g_imageMD.XRes();
pTexRow += g_nTexMapX;
}
}
// check if we need to draw depth frame to texture
if (g_nViewState == DISPLAY_MODE_OVERLAY ||
g_nViewState == DISPLAY_MODE_DEPTH)
{
const XnDepthPixel* pDepthRow = g_depthMD.Data();
XnRGB24Pixel* pTexRow = g_pTexMap + g_depthMD.YOffset() * g_nTexMapX;
for (XnUInt y = 0; y < g_depthMD.YRes(); ++y) //###########y < g_depthMD.YRes()
{
const XnDepthPixel* pDepth = pDepthRow;
XnRGB24Pixel* pTex = pTexRow + g_depthMD.XOffset();
for (XnUInt x = 0; x < g_depthMD.XRes(); ++x, ++pDepth, ++pTex) ////###########x < g_depthMD.XRes()
{
if (*pDepth != 0)
{
int nHistValue = g_pDepthHist[*pDepth]; // <------ color control [R|G|B]
pTex->nRed = 0;
pTex->nGreen = nHistValue;
pTex->nBlue = 0;
}
//draw the nearst point another color
if(abs(x - x_min) < 10 && abs(y - y_min) < 10 ){
int nHistValue = g_pDepthHist[*pDepth]; // <------ color control [R|G|B]
pTex->nRed = nHistValue;
pTex->nGreen = 0;
pTex->nBlue = 0;
}
}
pDepthRow += g_depthMD.XRes();
pTexRow += g_nTexMapX;
}
}
// Create the OpenGL texture map
/*
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, g_nTexMapX, g_nTexMapY, 0, GL_RGB, GL_UNSIGNED_BYTE, g_pTexMap);
*/
// Display the OpenGL texture map
/*
glColor4f(1,1,1,1);
glBegin(GL_QUADS);
*/
int nXRes = g_depthMD.FullXRes();
int nYRes = g_depthMD.FullYRes();
// upper left
/* glTexCoord2f(0, 0);
glVertex2f(0, 0);
// upper right
glTexCoord2f((float)nXRes/(float)g_nTexMapX, 0);
glVertex2f(GL_WIN_SIZE_X, 0);
// bottom right
glTexCoord2f((float)nXRes/(float)g_nTexMapX, (float)nYRes/(float)g_nTexMapY);
glVertex2f(GL_WIN_SIZE_X, GL_WIN_SIZE_Y);
// bottom left
glTexCoord2f(0, (float)nYRes/(float)g_nTexMapY);
glVertex2f(0, GL_WIN_SIZE_Y);
glEnd();
// Swap the OpenGL display buffers
glutSwapBuffers();
*/
}
// void glutKeyboard (unsigned char key, int /*x*/, int /*y*/)
/*
{
switch (key)
{
case 27:
exit (1);
case '1':
g_nViewState = DISPLAY_MODE_OVERLAY;
g_depth.GetAlternativeViewPointCap().SetViewPoint(g_image);
break;
case '2':
g_nViewState = DISPLAY_MODE_DEPTH;
g_depth.GetAlternativeViewPointCap().ResetViewPoint();
break;
case '3':
g_nViewState = DISPLAY_MODE_IMAGE;
g_depth.GetAlternativeViewPointCap().ResetViewPoint();
break;
case 'm':
g_context.SetGlobalMirror(!g_context.GetGlobalMirror());
break;
}
}
*/
int main(int argc, char* argv[])
{
XnStatus rc;
EnumerationErrors errors;
rc = g_context.InitFromXmlFile(SAMPLE_XML_PATH, g_scriptNode, &errors);
if (rc == XN_STATUS_NO_NODE_PRESENT)
{
XnChar strError[1024];
errors.ToString(strError, 1024);
printf("%s\n", strError);
return (rc);
}
else if (rc != XN_STATUS_OK)
{
printf("Open failed: %s\n", xnGetStatusString(rc));
return (rc);
}
rc = g_context.FindExistingNode(XN_NODE_TYPE_DEPTH, g_depth);
if (rc != XN_STATUS_OK)
{
printf("No depth node exists! Check your XML.");
return 1;
}
rc = g_context.FindExistingNode(XN_NODE_TYPE_IMAGE, g_image);
if (rc != XN_STATUS_OK)
{
printf("No image node exists! Check your XML.");
return 1;
}
g_depth.GetMetaData(g_depthMD);
g_image.GetMetaData(g_imageMD);
// Hybrid mode isn't supported in this sample
if (g_imageMD.FullXRes() != g_depthMD.FullXRes() || g_imageMD.FullYRes() != g_depthMD.FullYRes())
{
printf ("The device depth and image resolution must be equal!\n");
return 1;
}
// RGB is the only image format supported.
if (g_imageMD.PixelFormat() != XN_PIXEL_FORMAT_RGB24)
{
printf("The device image format must be RGB24\n");
return 1;
}
// Texture map init
g_nTexMapX = (((unsigned short)(g_depthMD.FullXRes()-1) / 512) + 1) * 512;
g_nTexMapY = (((unsigned short)(g_depthMD.FullYRes()-1) / 512) + 1) * 512;
g_pTexMap = (XnRGB24Pixel*)malloc(g_nTexMapX * g_nTexMapY * sizeof(XnRGB24Pixel));
g_nZRes = g_depthMD.ZRes();
g_pDepthHist = (float*)malloc(g_nZRes * sizeof(float));
while(1){
glutDisplay();
}
// OpenGL init
/*
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(GL_WIN_SIZE_X, GL_WIN_SIZE_Y);
glutCreateWindow ("OpenNI Simple Viewer");
glutFullScreen();
glutSetCursor(GLUT_CURSOR_NONE);
glutKeyboardFunc(glutKeyboard);
glutDisplayFunc(glutDisplay);
glutIdleFunc(glutIdle);
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
// Per frame code is in glutDisplay
glutMainLoop();
*/
return 0;
}
* *
* OpenNI 1.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* *
* This file is part of OpenNI. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
* *
*****************************************************************************/
//---------------------------------------------------------------------------
// Includes
//---------------------------------------------------------------------------
#include <XnOS.h>
/*
#if (XN_PLATFORM == XN_PLATFORM_MACOSX)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
*/
#include <math.h>
#include <XnCppWrapper.h>
using namespace xn; ///?
//---------------------------------------------------------------------------
// Defines
//---------------------------------------------------------------------------
#define SAMPLE_XML_PATH "/root/Desktop/OpenNI-master/Data/SamplesConfig.xml"
#define GL_WIN_SIZE_X 1280
#define GL_WIN_SIZE_Y 1024
#define DISPLAY_MODE_OVERLAY 1
#define DISPLAY_MODE_DEPTH 2
#define DISPLAY_MODE_IMAGE 3
#define DEFAULT_DISPLAY_MODE DISPLAY_MODE_DEPTH
//---------------------------------------------------------------------------
// Globals
//---------------------------------------------------------------------------
float* g_pDepthHist;
XnRGB24Pixel* g_pTexMap = NULL;
unsigned int g_nTexMapX = 0;
unsigned int g_nTexMapY = 0;
XnDepthPixel g_nZRes;
unsigned int g_nViewState = DEFAULT_DISPLAY_MODE;
Context g_context;
ScriptNode g_scriptNode;
DepthGenerator g_depth;
ImageGenerator g_image;
DepthMetaData g_depthMD; // <---- MD ==> [Meta Data]
ImageMetaData g_imageMD;
//---------------------------------------------------------------------------
// Code
//---------------------------------------------------------------------------
/*
void glutIdle (void)
{
// Display the frame
glutPostRedisplay();
}
*/
void glutDisplay (void)
{
XnStatus rc = XN_STATUS_OK;
// Read a new frame
rc = g_context.WaitAnyUpdateAll();
if (rc != XN_STATUS_OK)
{
printf("Read failed: %s\n", xnGetStatusString(rc));
return;
}
g_depth.GetMetaData(g_depthMD); //<-- raw depth data!!
g_image.GetMetaData(g_imageMD);
const XnDepthPixel* pDepth = g_depthMD.Data();
// Copied from SimpleViewer
// Clear the OpenGL buffers
// glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //<--glClear ==> [OpenGL Clear]
// Setup the OpenGL viewpoint
/* glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0, GL_WIN_SIZE_X, GL_WIN_SIZE_Y, 0, -1.0, 1.0); //<-- set the screen output size ; WIN ==> [screen window]
*/
/***********>begin<*********get the raw Depth data*****************************/
// Calculate the accumulative histogram (the yellow display...)
xnOSMemSet(g_pDepthHist, 0, g_nZRes*sizeof(float)); //<-- the data type is float
double minDepth = 2047 ; //<-- myParameter,2047 is larger(farther) to the camera that more easy to calulate
double mytmp = 0;
XnInt x_min = 640, y_min = 517; // the init point is on the center of the monitor screen.
unsigned int nNumberOfPoints = 0;
for (XnUInt y = 0; y < g_depthMD.YRes(); ++y) // <-- Res ==> [Resolution]
{
for (XnUInt x = 0; x < g_depthMD.XRes(); ++x, ++pDepth) ////###########y < g_depthMD.[X|Y]Res()
{
if (*pDepth != 0) // <-- ##! *pDepth point to the current pixel's z-coorditate depth
{
g_pDepthHist[*pDepth]++; // !here is the depth arry >g_pDepthHist[*pDepth]<
nNumberOfPoints++; //<--pixel sum counter
if(*pDepth > 0 && *pDepth < 2047 && *pDepth < minDepth ){
minDepth = *pDepth;
x_min = x; // record the most near pixel's x-y coordinate
y_min = y;
mytmp = 0.1236 * tan(minDepth / 2842.5 + 1.1863);
}
}
}
//output the distance data to the terminal
if(mytmp > 0){
printf("%lf\t",mytmp);//0.1236 * tan(minDepth / 2842.5 + 1.1863)
}
}
/*******>end<********get the raw Depth data**********************************/
for (int nIndex=1; nIndex<g_nZRes; nIndex++)
{
g_pDepthHist[nIndex] += g_pDepthHist[nIndex-1];
}
if (nNumberOfPoints)
{
for (int nIndex=1; nIndex<g_nZRes; nIndex++)
{
g_pDepthHist[nIndex] = (unsigned int)(256 * (1.0f - (g_pDepthHist[nIndex] / nNumberOfPoints))); // ??may be color trans??
}
}
xnOSMemSet(g_pTexMap, 0, g_nTexMapX*g_nTexMapY*sizeof(XnRGB24Pixel)); //<-- X*Y*sizeof()
// check if we need to draw image frame to texture
if (g_nViewState == DISPLAY_MODE_OVERLAY ||
g_nViewState == DISPLAY_MODE_IMAGE)
{
const XnRGB24Pixel* pImageRow = g_imageMD.RGB24Data();
XnRGB24Pixel* pTexRow = g_pTexMap + g_imageMD.YOffset() * g_nTexMapX;
for (XnUInt y = 0; y < g_imageMD.YRes(); ++y)
{
const XnRGB24Pixel* pImage = pImageRow;
XnRGB24Pixel* pTex = pTexRow + g_imageMD.XOffset();
for (XnUInt x = 0; x < g_imageMD.XRes(); ++x, ++pImage, ++pTex)
{
*pTex = *pImage;
}
pImageRow += g_imageMD.XRes();
pTexRow += g_nTexMapX;
}
}
// check if we need to draw depth frame to texture
if (g_nViewState == DISPLAY_MODE_OVERLAY ||
g_nViewState == DISPLAY_MODE_DEPTH)
{
const XnDepthPixel* pDepthRow = g_depthMD.Data();
XnRGB24Pixel* pTexRow = g_pTexMap + g_depthMD.YOffset() * g_nTexMapX;
for (XnUInt y = 0; y < g_depthMD.YRes(); ++y) //###########y < g_depthMD.YRes()
{
const XnDepthPixel* pDepth = pDepthRow;
XnRGB24Pixel* pTex = pTexRow + g_depthMD.XOffset();
for (XnUInt x = 0; x < g_depthMD.XRes(); ++x, ++pDepth, ++pTex) ////###########x < g_depthMD.XRes()
{
if (*pDepth != 0)
{
int nHistValue = g_pDepthHist[*pDepth]; // <------ color control [R|G|B]
pTex->nRed = 0;
pTex->nGreen = nHistValue;
pTex->nBlue = 0;
}
//draw the nearst point another color
if(abs(x - x_min) < 10 && abs(y - y_min) < 10 ){
int nHistValue = g_pDepthHist[*pDepth]; // <------ color control [R|G|B]
pTex->nRed = nHistValue;
pTex->nGreen = 0;
pTex->nBlue = 0;
}
}
pDepthRow += g_depthMD.XRes();
pTexRow += g_nTexMapX;
}
}
// Create the OpenGL texture map
/*
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, g_nTexMapX, g_nTexMapY, 0, GL_RGB, GL_UNSIGNED_BYTE, g_pTexMap);
*/
// Display the OpenGL texture map
/*
glColor4f(1,1,1,1);
glBegin(GL_QUADS);
*/
int nXRes = g_depthMD.FullXRes();
int nYRes = g_depthMD.FullYRes();
// upper left
/* glTexCoord2f(0, 0);
glVertex2f(0, 0);
// upper right
glTexCoord2f((float)nXRes/(float)g_nTexMapX, 0);
glVertex2f(GL_WIN_SIZE_X, 0);
// bottom right
glTexCoord2f((float)nXRes/(float)g_nTexMapX, (float)nYRes/(float)g_nTexMapY);
glVertex2f(GL_WIN_SIZE_X, GL_WIN_SIZE_Y);
// bottom left
glTexCoord2f(0, (float)nYRes/(float)g_nTexMapY);
glVertex2f(0, GL_WIN_SIZE_Y);
glEnd();
// Swap the OpenGL display buffers
glutSwapBuffers();
*/
}
// void glutKeyboard (unsigned char key, int /*x*/, int /*y*/)
/*
{
switch (key)
{
case 27:
exit (1);
case '1':
g_nViewState = DISPLAY_MODE_OVERLAY;
g_depth.GetAlternativeViewPointCap().SetViewPoint(g_image);
break;
case '2':
g_nViewState = DISPLAY_MODE_DEPTH;
g_depth.GetAlternativeViewPointCap().ResetViewPoint();
break;
case '3':
g_nViewState = DISPLAY_MODE_IMAGE;
g_depth.GetAlternativeViewPointCap().ResetViewPoint();
break;
case 'm':
g_context.SetGlobalMirror(!g_context.GetGlobalMirror());
break;
}
}
*/
int main(int argc, char* argv[])
{
XnStatus rc;
EnumerationErrors errors;
rc = g_context.InitFromXmlFile(SAMPLE_XML_PATH, g_scriptNode, &errors);
if (rc == XN_STATUS_NO_NODE_PRESENT)
{
XnChar strError[1024];
errors.ToString(strError, 1024);
printf("%s\n", strError);
return (rc);
}
else if (rc != XN_STATUS_OK)
{
printf("Open failed: %s\n", xnGetStatusString(rc));
return (rc);
}
rc = g_context.FindExistingNode(XN_NODE_TYPE_DEPTH, g_depth);
if (rc != XN_STATUS_OK)
{
printf("No depth node exists! Check your XML.");
return 1;
}
rc = g_context.FindExistingNode(XN_NODE_TYPE_IMAGE, g_image);
if (rc != XN_STATUS_OK)
{
printf("No image node exists! Check your XML.");
return 1;
}
g_depth.GetMetaData(g_depthMD);
g_image.GetMetaData(g_imageMD);
// Hybrid mode isn't supported in this sample
if (g_imageMD.FullXRes() != g_depthMD.FullXRes() || g_imageMD.FullYRes() != g_depthMD.FullYRes())
{
printf ("The device depth and image resolution must be equal!\n");
return 1;
}
// RGB is the only image format supported.
if (g_imageMD.PixelFormat() != XN_PIXEL_FORMAT_RGB24)
{
printf("The device image format must be RGB24\n");
return 1;
}
// Texture map init
g_nTexMapX = (((unsigned short)(g_depthMD.FullXRes()-1) / 512) + 1) * 512;
g_nTexMapY = (((unsigned short)(g_depthMD.FullYRes()-1) / 512) + 1) * 512;
g_pTexMap = (XnRGB24Pixel*)malloc(g_nTexMapX * g_nTexMapY * sizeof(XnRGB24Pixel));
g_nZRes = g_depthMD.ZRes();
g_pDepthHist = (float*)malloc(g_nZRes * sizeof(float));
while(1){
glutDisplay();
}
// OpenGL init
/*
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(GL_WIN_SIZE_X, GL_WIN_SIZE_Y);
glutCreateWindow ("OpenNI Simple Viewer");
glutFullScreen();
glutSetCursor(GLUT_CURSOR_NONE);
glutKeyboardFunc(glutKeyboard);
glutDisplayFunc(glutDisplay);
glutIdleFunc(glutIdle);
glDisable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE_2D);
// Per frame code is in glutDisplay
glutMainLoop();
*/
return 0;
}