예제 #1
0
        public ShaderProgram(byte[] vpFileImage, byte[] fpFileImage, ShaderProgramOption option)
        {
            string[] constKeys = ShaderProgram.GetConstKeys(option);
            int[]    constVals = ShaderProgram.GetConstVals(option);
            int      errorCode = PsmShaderProgram.FromImage(vpFileImage, fpFileImage, constKeys, constVals, out this.handle);

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