Results 1 to 3 of 3

Thread: 1D texture

  1. #1
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    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
    Senior Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    992

    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
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    Re: 1D texture

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

Similar Threads

  1. Replies: 1
    Last Post: 12-26-2014, 04:57 PM
  2. Replies: 1
    Last Post: 03-10-2014, 12:51 PM
  3. Replies: 2
    Last Post: 09-27-2004, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean