Exemplo n.º 1
0
        private void AddNew(ShaderResourceView texture, SpriteVertex 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();
        }
        private void AddNew(object 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);
            spriteCount++;
            CheckForFullBuffer();
        }
Exemplo n.º 3
0
 private void AddIn(SpriteSegment segment, SpriteVertex data)
 {
     segment.Sprites.Add(data);
     CheckForFullBuffer();
 }
 private void AddIn(SpriteSegment segment, SpriteVertexLayout.Struct data)
 {
     segment.Sprites.Add(data);
     spriteCount++;
     CheckForFullBuffer();
 }