Exemplo n.º 1
0
 public void GetOrCreate(VertexInputLayout layout, out InputLayoutPair currentPassPreviousPair)
 {
     lock (Cache)
     {
         if (!Cache.TryGetValue(layout, out currentPassPreviousPair))
         {
             currentPassPreviousPair = new InputLayoutPair(layout, ToDispose(new InputLayout(device, Bytecode, layout.InputElements)));
             Cache.Add(layout, currentPassPreviousPair);
         }
     }
 }
Exemplo n.º 2
0
        public void GetOrCreate(VertexInputLayout layout, out InputLayoutPair currentPassPreviousPair)
        {
            lock (Cache)
            {
                if (!Cache.TryGetValue(layout, out currentPassPreviousPair))
                {

                    currentPassPreviousPair = new InputLayoutPair(layout, ToDispose(new InputLayout(device, Bytecode, layout.InputElements)));
                    Cache.Add(layout, currentPassPreviousPair);
                }
            }
        }
Exemplo n.º 3
0
        public void GetOrCreate(VertexInputLayout layout, out InputLayoutPair currentPassPreviousPair)
        {
            if (!ContextCache.TryGetValue(layout, out currentPassPreviousPair))
            {
                lock (DeviceCache)
                {
                    if (!DeviceCache.TryGetValue(layout, out currentPassPreviousPair))
                    {

                        currentPassPreviousPair.InputLayout = new InputLayout(device, Bytecode, layout.InputElements);
                        currentPassPreviousPair.VertexInputLayout = layout;
                        DeviceCache.Add(layout, currentPassPreviousPair);
                    }
                }

                ContextCache.Add(layout, currentPassPreviousPair);
            }
        }