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 2 of 2

Thread: glTexImage2D Error?

  1. #1
    Intern Newbie
    Join Date
    Jun 2011
    Posts
    36

    glTexImage2D Error?

    Basically have this:

    Code :
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
     
     
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
     
     
    glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA8, 3, 10, 0, GL_ALPHA, GL_UNSIGNED_BYTE, pixels);

    There should be 3 pixels per row but it ignores 1 pixel, so it actually goes through 4 * 10 pixels not 3 * 10, and 1 pixel is lost for every row.

    I've debugged glTexImage2D(), i've found the cause, i'm not entire sure if which party is involved in the implementation but yah:



    I've tried it on a 660 gtx and an old 3650 radeon mobile. Both get the same error.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	MLaAsNB.jpg 
Views:	30 
Size:	19.7 KB 
ID:	1394  

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,217

Posting Permissions

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