static ModelBuffer CreateModelBuffer(Int64 type, Int32 size = 32)
        {
            long        t   = type;
            List <Type> tmp = new List <Type>();

            for (int i = 0; i < 64; i++)
            {
                if (t > 0)
                {
                    if ((t & 1) > 0)
                    {
                        tmp.Add(types[i].type);
                    }
                    t >>= 1;
                }
                else
                {
                    break;
                }
            }
            ModelBuffer model = new ModelBuffer(type, size, tmp.ToArray(), null);

            models.Add(model);
            return(model);
        }
예제 #2
0
        public override void Dispose()
        {
            base.Dispose();

            Renderer.GraphicsDevice.WaitForIdle();
            CommandList?.Dispose();
            ModelBuffer?.Dispose();
            ModelResourceSet?.Dispose();
        }