internal void DeleteResource(GraphicsResource resource)
        {
            if (resource.InternalUseCount > 0)
                return; //throw new Exception("Resource with name \"" + resource.Name + "\" is still used! InternalUseCount: " + resource.InternalUseCount);

            _GraphicsResources.Remove(resource);
        }
        internal void AddResource(GraphicsResource resource)
        {
            int counter = 0;
            bool repeat = false;

            string name = resource.Name;

            do
            {
                try
                {
                    foreach (GraphicsResource r in _GraphicsResources)
                    {
                        if (r.Name == resource.Name)
                            throw new Exception("Resource with name \"" + r.Name + "\" is already existing!");

                        if (!resource.Created)
                            throw new Exception("Resource with name \"" + resource.Name + "\" is not created!");
                    }

                    repeat = false;

                }catch 
                {
                    repeat = true;
                    resource.Name = name + "+" + counter;
                    counter++;
                }
            } while(repeat);

            _GraphicsResources.Add(resource);
        }