PDA

View Full Version : Question about color texturing‏



NETWORKER
05-07-2014, 04:11 PM
1297

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.

reto.koradi
05-10-2014, 01:55 PM
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.