GetInstance() 공개 정적인 메소드

public static GetInstance ( NTexture texture, string shaderName, string keywords ) : MaterialManager
texture NTexture
shaderName string
keywords string
리턴 MaterialManager
예제 #1
0
파일: NGraphics.cs 프로젝트: mengtest/u1
        void UpdateManager()
        {
            if (_manager != null)
            {
                _manager.Release();
            }

            if (_texture != null)
            {
                _manager = MaterialManager.GetInstance(_texture, _shader, _materialKeywords);
            }
            else
            {
                _manager = null;
            }
        }
예제 #2
0
 public void SetShaderAndTexture(string shader, NTexture texture)
 {
     _shader  = shader;
     _texture = texture;
     if (_texture != null)
     {
         _manager = MaterialManager.GetInstance(_texture, _shader);
         if (_material != null)
         {
             _material.mainTexture = _texture.nativeTexture;
         }
     }
     else
     {
         if (_material != null)
         {
             _material.mainTexture = null;
         }
         _manager = null;
     }
 }