public void RegisterShader(int ptr) { if (shaders.ContainsKey(ptr)) { throw GraphicsDeviceException.ShaderAddedTwice(); } shaders.Add(ptr, new HashSet <int>()); }
public void RegisterResourseSlot(int ptr, int slot) { if (shaders[ptr].Contains(slot)) { throw GraphicsDeviceException.ResourseSlotAlreadyUsed(slot); } shaders[ptr].Add(slot); }