augmented-reality-with-microsoft-kinect icon indicating copy to clipboard operation
augmented-reality-with-microsoft-kinect copied to clipboard

Binding background texture

Open lindseydi opened this issue 11 years ago • 2 comments

For some reason the program will not map the background texture provided in any of the projects. I have checked to make sure it is not having trouble finding the actual picture and that does not seem to be the cause of the issue. Is anyone else having this problem? Advice?

// Draw background quad GLfloat vertices[][3] = { { 0.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f } }; GLfloat texcoords[][2] = { {0.0f, 1.0f}, {1.0f, 1.0f}, {1.0f, 0.0f}, {0.0f, 0.0f} }; VertexData meshData = { &(vertices[0][0]), NULL, NULL, &(texcoords[0][0]) };

glBindTexture( GL_TEXTURE_2D, playerColorTexture->id );
drawSimpleMesh( WITH_POSITION|WITH_TEXCOORD, 4, meshData, GL_QUADS );

It first appears in chapter 3 example 2, but then this same methodology and thus problem continues throughout the rest of the book. It really takes away from the augmented reality when it's just a black background. Any advice is appreciated!

lindseydi avatar Jan 28 '14 02:01 lindseydi

Update 2/9/14 - If you run the program in debug mode the textures will not load, the actual executable must be run in order for the textures to show up.

I'm not sure if this depends on the graphics card or if I've just never encountered this before.

lindseydi avatar Feb 09 '14 23:02 lindseydi

If the original example doesn't work for you, please check whether your Kinect device is setup correctly by running its own examples, or just as you said, try another graphics card or some other OpenGL applications supporting texture mapping. Your problem seems odd to me...

xarray avatar Feb 10 '14 14:02 xarray