Nez.Portable/Utils/NezContentManager.cs
/// <summary>
/// loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed. Name should the the path
/// relative to the Content folder or including the Content folder. Effects must have a constructor that accepts GraphicsDevice and
/// byte[]. Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication.
/// </summary>
/// <returns>The effect.</returns>
/// <param name="name">Name.</param>
loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed. Name should the the path
relative to the Content folder or including the Content folder. Effects must have a constructor that accepts GraphicsDevice and
byte[]. Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication.
loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed . Name should the the path relative to the Content folder or including the Content folder . Effects must have a constructor that accepts GraphicsDevice and byte [] . Note that this will return a unique instance if you attempt to load the same Effect twice to avoid Effect duplication .
public T loadEffect<T>(string name)
            where T : Effect
        {
            if (!name.StartsWith(RootDirectory))
                name = RootDirectory + "/" + name;
            var bytes = EffectResource.getFileResourceBytes(name);
            return loadEffect<T>(name, bytes);
        }
public T loadEffect < T > ( string name ) where T : Effect { if ( ! name . StartsWith ( RootDirectory ) ) name = RootDirectory + " " + name ; var bytes = EffectResource . getFileResourceBytes ( name ) ; return loadEffect < T > ( name , bytes ) ; }
loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed.
loads an ogl effect directly from file and handles disposing of it when the ContentManager is disposed .
// make sure the effect has the proper root directory
None
name
string
None