Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
EffectInputSignature.OpenGL.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_OPENGL
4 using System.Collections.Generic;
5 using SiliconStudio.Core.Storage;
6 
7 namespace SiliconStudio.Paradox.Graphics
8 {
9  public partial class EffectInputSignature
10  {
11  private readonly byte[] bytecode;
12 
13  // TODO: Maybe EffectInputSignature should be tied to a device?
14  public Dictionary<string, int> Attributes { get; private set; }
15 
16  internal EffectInputSignature(ObjectId id, byte[] bytecode)
17  {
18  this.Id = id;
19  this.bytecode = bytecode;
20  Attributes = new Dictionary<string, int>();
21  }
22 
23  internal byte[] NativeSignature
24  {
25  get
26  {
27  return bytecode;
28  }
29  }
30 
31  public static void OnDestroyed()
32  {
33  lock (RegisteredSignatures)
34  {
35  foreach (var inputLayout in RegisteredSignatures)
36  {
37  inputLayout.Value.Attributes.Clear();
38  }
39  }
40  }
41  }
42 }
43 #endif