Exemplo n.º 1
0
        private void LinkProgramSetUpVariables()
        {
            GL.LinkProgram(Id);
            LinkStatusIsOk = ShaderValidation.GetProgramLinkStatus(Id);

            TryLoadShaderVariables();
        }
Exemplo n.º 2
0
        public bool TryLoadProgramFromBinary(byte[] programBinary, BinaryFormat binaryFormat)
        {
            try
            {
                // Linking isn't necessary when loading a program binary.
                GL.ProgramBinary(Id, binaryFormat, programBinary, programBinary.Length);
            }
            catch (AccessViolationException)
            {
                // The binary is corrupt or the wrong format.
                return(false);
            }

            LinkStatusIsOk = ShaderValidation.GetProgramLinkStatus(Id);
            TryLoadShaderVariables();
            return(true);
        }