Пример #1
0
        public static RenderData <T> Create(RenderManager manager, PrimitiveTopology topology, T[] data, int count = 0)
        {
            if (count == 0)
            {
                count = data.Length;
            }

            RenderData <T> ret = new RenderData <T>();

            ret.topology = topology;
            ret.device   = manager.Device;
            ret.stride   = Utilities.SizeOf <T>();
            ret.ResetBuffer(data, count);

            return(ret);
        }
Пример #2
0
 public void Draw <T>(RenderData <T> data) where T : struct
 {
     data.Render(context);
 }
Пример #3
0
 public void SetRenderData <T>(RenderData <T> data) where T : struct
 {
     data.SetupDeviceContext(context);
 }