1D texture

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


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);

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?

Forget this post, it was a subtle math bug: nothing to do with OpenGL…