private void DecodeWiiUBinary(BfshaLibrary.ResShaderProgram program)
        {
            var vertexShader = BfshaGX2ShaderHelper.CreateVertexShader(ShaderModel, program);
            var pixelShader  = BfshaGX2ShaderHelper.CreatePixelShader(ShaderModel, program);

            GLShaders[ShaderIndex] = CafeShaderDecoder.LoadShaderProgram(vertexShader, pixelShader);
            shaderProgram          = GLShaderInfo.Program;
        }
        /// <summary>
        /// Reloads the glsl shader file from the shader cache or saves a translated one if does not exist.
        /// </summary>
        public void ReloadGLSLShaderFile()
        {
            var vertexData = ShaderModel.ParentFile.Binaries[BinaryIndex];
            var pixelData  = ShaderModel.ParentFile.Binaries[BinaryIndex + 1];

            GLShaders[ShaderIndex] = CafeShaderDecoder.LoadShaderProgram(vertexData.DataBytes, pixelData.DataBytes);
            shaderProgram          = GLShaderInfo.Program;

            UpdateShader = false;
        }
        public void OnLoad(GX2VertexShader vertexShader, GX2PixelShader pixelShader)
        {
            ShaderInfo = CafeShaderDecoder.LoadShaderProgram(vertexShader.DataBytes, pixelShader.DataBytes);

            VertexShaderSource = System.IO.File.ReadAllText(ShaderInfo.VertPath);
            FragShaderSource   = System.IO.File.ReadAllText(ShaderInfo.FragPath);

            if (VertexShaderSource == null)
            {
                VertexShaderSource = "";
            }
            if (FragShaderSource == null)
            {
                FragShaderSource = "";
            }
        }