Question about color texturing‏

[ATTACH=CONFIG]632[/ATTACH]

Hello, I’m from Mexico and I’m writing code in OpenGL and I think you could help me. I have a source code that basically loads RGB and depth Kinect images and display that information in 3D.

Unfortunately, it seems that color texture mapping using glDrawElements is somewhat misaligned (the original image is repeated four times or so). I have I attached my source code and an image showing my results. That’s the reason I think OpenGL is not interpreting the image buffer “rgb” correctly. I have used SOIL with the same result. However, I’ve drawn each pixel using glVertex3f and glColor3f without problem.

I’m working on Ubuntu 12.04. Hope you can help me.

Best wishes, and thanks in advance.

From scanning through your code, I don’t think you’re setting up your texture coordinates properly. You’re using the same values for the vertex coordinates and the texture coordinates.