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

Close

support for non-power-of-two textures

2006-12-27
2013-05-02
  • step 1:

    under ILboolean HasCubemapHardware = IL_FALSE;
    add:
             ILboolean HasNonPowerOfTwoHardware = IL_FALSE;

    step 2:
    under
        if (IsExtensionSupported("GL_ARB_texture_cube_map"))
            HasCubemapHardware = IL_TRUE;
    add:
        if (IsExtensionSupported("GL_ARB_texture_non_power_of_two"))
            HasNonPowerOfTwoHardware = IL_TRUE;

    step 3:
    in MakeGLCompliant
    surround the image resize block with:

        if (HasNonPowerOfTwoHardware == IL_FALSE)
        {
            if (Src->Width  != ilNextPower2(Src->Width)  ||
                Src->Height != ilNextPower2(Src->Height) ||
    ......
            }

     
    • Dario Meloni
      Dario Meloni
      2006-12-29

      It is a bit more complicated due to the text with the maximum size of a texture. fixed.