PDA

View Full Version : 1D texture



devdept
12-01-2010, 08:01 AM
Hi All,

We have le following issue. A is correct, B is not. As you can see the plot contour (red arrows) is wrong. We are sure that all the numerical data are perfect. What else should we check in OpenGL settings?

We are using the code (down) below to prepare the texture.

Thanks,

Alberto

http://www.devdept.com/texture_1D.gif



glBindTexture(GL_TEXTURE_1D, textureName);
glTexImage1D(GL_TEXTURE_1D, 0, GL_RGB, data.Width, 0, GL_BGR, GL_UNSIGNED_BYTE, data.Scan0);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, gl.NEAREST);
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

aqnuep
12-01-2010, 08:11 AM
I was thinking of mipmapping but as I see you don't even use a mipmapped texture filtering method so it is pretty strange.

What's the difference between how you rendered the first and the second image?

devdept
12-01-2010, 09:09 AM
Forget this post, it was a subtle math bug: nothing to do with OpenGL...