Beispiel #1
0
        public void AddShader(Shader sh)
        {
            foreach (Shader r in _Shaders)
            {
                if ((r.ID == sh.ID) || (r.Name == sh.Name))
                    throw new Exception("Shader with name or ID is already attached!");
            }

            GL.AttachShader(ID, sh.ID);

            sh.SetUseCount(sh.InternalUseCount + 1);
            _Shaders.Add(sh);
        }
Beispiel #2
0
        public void DeleteShader(Shader sh)
        {
            GL.DetachShader(ID, sh.ID);

            _Shaders.Remove(sh);
            sh.SetUseCount(sh.InternalUseCount - 1);
        }