예제 #1
0
파일: VAO.cs 프로젝트: newo2001/GSharp
 public VertexElement(Util.DataType type, int size, int offset, bool normalized = false)
 {
     Type       = type;
     Size       = size;
     Offset     = offset;
     Normalized = normalized;
 }
예제 #2
0
파일: VAO.cs 프로젝트: newo2001/GSharp
        public void AddElement(Util.DataType type, int count, bool normalized = false)
        {
            int offset = 0;

            if (Elements.Count > 0)
            {
                offset = Elements[Elements.Count - 1].Offset + Elements[Elements.Count - 1].Size * Elements[Elements.Count - 1].Type.GetSize();
            }

            Elements.Add(new VertexElement(type, count, offset, normalized));
        }