Beispiel #1
0
        public DXSpriteRenderer(DXGraphicsHost graphicsHost, DXTextureFactory textureFactory, int initialSpriteCapacity = 1024)
            : base(textureFactory, initialSpriteCapacity)
        {
            if (graphicsHost == null)
            {
                throw new ArgumentNullException(nameof(graphicsHost));
            }

            this.graphicsHost = graphicsHost;

            this.constantBufferData = new ConstantBuffer();

            this.PlatformCreateBuffers();
            this.PlatformCreateShaders();
        }
Beispiel #2
0
        public DXGraphicsCommandListPool(DXGraphicsHost graphicsHost, CommandAllocator allocator, CommandListType type, string debugName = "CMDLIST")
            : base()
        {
            if (graphicsHost == null)
            {
                throw new ArgumentNullException(nameof(graphicsHost));
            }
            if (allocator == null)
            {
                throw new ArgumentNullException(nameof(allocator));
            }

            this.graphicsHost = graphicsHost;
            this.allocator    = allocator;
            this.type         = type;
            this.debugName    = debugName;
            this.spareObjects = new ConcurrentBag <GraphicsCommandList>();
        }
Beispiel #3
0
 public DXTextureFactory(DXGraphicsHost host, ITextureLoader loader, int capacity = 1024)
     : base(loader, capacity)
 {
     this.graphicsHost = host;
 }