Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


ilutGLSubTex and glPixelStorei

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

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