Skip to content
  • Robert Menzel's avatar
    Automatic consistent attribute location mappings possible · 708174d6
    Robert Menzel authored
    Example:
    SharedLocationMappings globalLocationMappings = SharedLocationMappings( new LocationMappings );
    // now the map could get set by hand, but thats not needed:
    ShaderProgramFileManager::the()->get( ShaderProgramControlFiles("shader1").
                                          externAttributeLocations(globalLocationMappings) );
    // will add all maps from the shader1 to the global map
    ShaderProgramFileManager::the()->get( ShaderProgramControlFiles("shader2").
                                          externAttributeLocations(globalLocationMappings) );
    // will add all maps from shader2, attributes already known will not get changed, no location collitions.
    
    Reloading of the shaders due to changed files will automatically set the locations again.
    708174d6