Esempio n. 1
0
        private void AddNew(ShaderResourceView Texture, SpriteVertexLayout.Struct Data)
        {
            //Create new segment with initial values
            var NewSegment = new SpriteSegment();

            NewSegment.Texture = Texture;
            NewSegment.Sprites.Add(Data);
            Sprites.Add(NewSegment);

            //Create reference for segment in dictionary
            if (!TextureSprites.ContainsKey(Texture))
            {
                TextureSprites.Add(Texture, new List <SpriteSegment>());
            }

            TextureSprites[Texture].Add(NewSegment);
            CheckForFullBuffer();
        }
Esempio n. 2
0
 private void AddIn(SpriteSegment Segment, SpriteVertexLayout.Struct Data)
 {
     Segment.Sprites.Add(Data);
     CheckForFullBuffer();
 }