Microsoft.Xna.Framework.Graphics.Effect.ReadAnnotations C# (CSharp) Method

ReadAnnotations() private static method

private static ReadAnnotations ( BinaryReader reader ) : EffectAnnotationCollection
reader System.IO.BinaryReader
return EffectAnnotationCollection
        private static EffectAnnotationCollection ReadAnnotations(BinaryReader reader)
        {
            var count = (int)reader.ReadByte();
            if (count == 0)
                return EffectAnnotationCollection.Empty;

            var annotations = new EffectAnnotation[count];

            // TODO: Annotations are not implemented!

            return new EffectAnnotationCollection(annotations);
        }

Usage Example

Example #1
0
        private static EffectPassCollection ReadPasses(BinaryReader reader, Effect effect, List <Shader> shaders)
        {
            Shader vertexShader = (Shader)null;
            Shader pixelShader  = (Shader)null;
            EffectPassCollection effectPassCollection = new EffectPassCollection();
            int num = (int)reader.ReadByte();

            for (int index1 = 0; index1 < num; ++index1)
            {
                string name = reader.ReadString();
                EffectAnnotationCollection annotations = Effect.ReadAnnotations(reader);
                int index2 = (int)reader.ReadByte();
                if (index2 != (int)byte.MaxValue)
                {
                    vertexShader = shaders[index2];
                }
                int index3 = (int)reader.ReadByte();
                if (index3 != (int)byte.MaxValue)
                {
                    pixelShader = shaders[index3];
                }
                EffectPass pass = new EffectPass(effect, name, vertexShader, pixelShader, (BlendState)null, (DepthStencilState)null, (RasterizerState)null, annotations);
                effectPassCollection.Add(pass);
            }
            return(effectPassCollection);
        }
All Usage Examples Of Microsoft.Xna.Framework.Graphics.Effect::ReadAnnotations