Ejemplo n.º 1
0
        public static SkinnedEffect GetSkinnedEffect(this IGraphicsService graphicsService)
        {
            if (graphicsService == null)
            {
                throw new ArgumentNullException("graphicsService");
            }

            const string key = "__WrappedSkinnedEffect";
            object       effect;

            graphicsService.Data.TryGetValue(key, out effect);
            var instance = effect as WrappedSkinnedEffect;

            if (instance == null)
            {
                instance = new WrappedSkinnedEffect(graphicsService.GraphicsDevice);
                graphicsService.Data[key] = instance;
            }
            return(instance);
        }
Ejemplo n.º 2
0
        public static SkinnedEffect GetSkinnedEffect(this IGraphicsService graphicsService)
        {
            if (graphicsService == null)
            throw new ArgumentNullException("graphicsService");

              const string key = "__WrappedSkinnedEffect";
              object effect;
              graphicsService.Data.TryGetValue(key, out effect);
              var instance = effect as WrappedSkinnedEffect;
              if (instance == null)
              {
            instance = new WrappedSkinnedEffect(graphicsService.GraphicsDevice);
            graphicsService.Data[key] = instance;
              }
              return instance;
        }