Exemple #1
0
 public VertexAttribute Add(VertexAttribute attribute)
 {
     attribute.Offset = Stride;
     Stride          += attribute.Stride();
     _attributes.Add(attribute);
     return(attribute);
 }
Exemple #2
0
        public VertexAttribute Add(VertexUsage usage,
                                   VertexAttribPointerType type,
                                   int index,
                                   int dimension,
                                   int offset,
                                   bool normalized)
        {
            VertexAttribute attribute = new VertexAttribute()
            {
                Usage = usage, Type = type, Index = index, Dimension = dimension, Offset = offset, Normalized = normalized
            };

            Stride += attribute.Stride();
            _attributes.Add(attribute);
            return(attribute);
        }