Menu

support for non-power-of-two textures

2006-12-27
2013-05-02
  • Nobody/Anonymous

    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) ||
    ......
            }

     
    • Anonymous

      Anonymous - 2006-12-29

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

       

Log in to post a comment.