Skip to content
  • Manuel Stoeckl's avatar
    Use texture unpacking for QImage uploads when possible · 2aa3ed00
    Manuel Stoeckl authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
    This change avoids unnecessary copying of QImage data when updating
    textures using QImages that have non-ARGB32_Premultiplied formats.
    
    There are three cases where texture unpacking can not be done/is
    not worth doing: if GLES is used, and the extension for unpacking
    subimages is not supported; if the entire image is being updated;
    or if a format conversion needs to be done, in which case only the
    region to update will have its format converted, and the resulting
    image can be passed directly to glTexSubImage2d without setting
    unpacking parameters.
    2aa3ed00