Exemplo n.º 1
0
//----------------------------------------------------------------------------//
Sizef OpenGLRendererBase::getAdjustedTextureSize(const Sizef& sz) const
{
    Sizef out(sz);

    // if we can't support non power of two sizes, get appropriate POT values.
    if (!GLEW_ARB_texture_non_power_of_two)
    {
        out.d_width = getNextPOTSize(out.d_width);
        out.d_height = getNextPOTSize(out.d_height);
    }

    return out;
}
//----------------------------------------------------------------------------//
Size IrrlichtRenderer::getAdjustedTextureSize(const Size& sz) const
{
    Size out(sz);

    // if we can't support non power of two sizes, get appropriate POT values.
    if (!d_supportsNPOTTextures)
    {
        out.d_width = getNextPOTSize(out.d_width);
        out.d_height = getNextPOTSize(out.d_height);
    }

    // if we can't support non square textures, make size square.
    if (!d_supportsNSquareTextures)
        out.d_width = out.d_height = ceguimax(out.d_width, out.d_height);

    return out;
}