示例#1
0
        private bool linkProgram()
        {
            _graphics.LinkProgram(_program);
            string info      = _graphics.GetProgramInfoLog(_program);
            int    errorCode = _graphics.GetProgramLinkErrorCode(_program);

            if (errorCode != 1)
            {
                Debug.WriteLine($@"Failed to link shader program. Error code: {errorCode}.{Environment.NewLine}
                    Error message(s): {info ?? "null"}{Environment.NewLine}");
                _graphics.DeleteProgram(_program);
                _program = 0;
                return(false);
            }
            return(true);
        }
示例#2
0
        private bool linkProgram()
        {
            _graphics.LinkProgram(_program);
            string info      = _graphics.GetProgramInfoLog(_program);
            int    errorCode = _graphics.GetProgramLinkErrorCode(_program);

            if (errorCode != 1)
            {
                Debug.WriteLine(string.Format("Failed to link shader program. Error code: {0}.{2}Error message(s): {1}{2}",
                                              errorCode, info ?? "null", Environment.NewLine));
                _graphics.DeleteProgram(_program);
                _program = 0;
                return(false);
            }
            return(true);
        }