Ejemplo n.º 1
0
        public ShaderProgram(string vpFileName, string fpFileName, ShaderProgramOption option)
        {
            string[] constKeys = ShaderProgram.GetConstKeys(option);
            int[]    constVals = ShaderProgram.GetConstVals(option);
            int      errorCode = PsmShaderProgram.FromFile(vpFileName, fpFileName, constKeys, constVals, out this.handle);

            if (errorCode != 0)
            {
                Error.ThrowNativeException(errorCode);
            }
            this.state = new ShaderProgramState(this.handle);
        }