Skip to content
  • Vlad Zahorodnii's avatar
    effects: Fix resource file reading for builtin effects · 754e0d8f
    Vlad Zahorodnii authored
    Currently, the invert effect doesn't work because it can't load its
    fragment shader because builtin effects are static libs. We need
    Q_INIT_RESOURCE() before reading shader code.
    
    This modularizes builtin effects more, which makes easier to add and
    remove builtin effects, as well as allows to have per effect resources.
    
    Technically, changing the inner workings of the ShaderManager is an
    API incompatible change, but ShaderManager::generateShaderFromResources()
    can be used only by builtin effects so it's okay.
    
    ShaderManager::generateShaderFromResources() had to be changed because
    two resource files can't share the same prefix. Appending "_core" was
    inspired by QtQuick.
    754e0d8f