Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: 1D texture

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    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



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

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    941

    Re: 1D texture

    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?
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    656

    Re: 1D texture

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •