ilutGLSubTex and glPixelStorei

  • Nobody/Anonymous

    When updating a texture with ilutGLSubTex, the OpenGL UNPACK states might have changed (compared to what they were when creating the texture with ilutGLBindTexImage)

    I suggest adding the following code to ilutGLSubTex, just before glTexSubImage2D
    (these are copied settings from ilutGLBindTexImage)

        ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        ::glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
        ::glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
        ::glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
        ::glPixelStorei(GL_UNPACK_SWAP_BYTES, IL_FALSE);

    • Nobody/Anonymous

      remove the :: in front of the OpenGL calls (namespace issue)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks