Microsoft.Xna.Framework.Graphics.Shader.PlatformConstruct C# (CSharp) Method

PlatformConstruct() private method

private PlatformConstruct ( BinaryReader reader, bool isVertexShader, byte shaderBytecode ) : void
reader System.IO.BinaryReader
isVertexShader bool
shaderBytecode byte
return void
        private void PlatformConstruct(BinaryReader reader, bool isVertexShader, byte[] shaderBytecode)
        {
            _glslCode = System.Text.Encoding.ASCII.GetString(shaderBytecode);

            HashKey = MonoGame.Utilities.Hash.ComputeHash(shaderBytecode);

            var attributeCount = (int)reader.ReadByte();
            _attributes = new Attribute[attributeCount];
            for (var a = 0; a < attributeCount; a++)
            {
                _attributes[a].name = reader.ReadString();
                _attributes[a].usage = (VertexElementUsage)reader.ReadByte();
                _attributes[a].index = reader.ReadByte();
                reader.ReadInt16(); //format, unused
            }
        }