My eyes (much) prefer the 40-char version to that last code at the end, though I might do it like so:<p><pre><code>    int w, h;
    
    w = desired_width;
    w *= scale_factor;
    w += padding;
    
    h = desired_height;
    h *= scale_factor;
    h += padding;

    glBindTexture(
        GL_TEXTURE_2D, someTexture
    );
    glTexImage2D(
        GL_TEXTURE_2D, level, format, 
        w, h, border, format, type, data
    );
    glTexParameter(
        GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
        GL_REPEAT
    );
</code></pre>
That&#x27;s assuming C, for C++ I might start it off like so:<p><pre><code>    int w = desired_width;
    w *= scale_factor;
    w += padding;
    
    int h = desired_height;
    h *= scale_factor;
    h += padding;
</code></pre>
I might be tempted to use a macro but likely pass and just use shorter names all around.