Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new instance of the texture manager.
        /// </summary>
        /// <param name="context">GPU context that the texture manager belongs to</param>
        /// <param name="channel">GPU channel that the texture manager belongs to</param>
        public TextureManager(GpuContext context, GpuChannel channel)
        {
            _context = context;

            TexturePoolCache texturePoolCache = new TexturePoolCache(context);

            _cpBindingsManager = new TextureBindingsManager(context, channel, texturePoolCache, isCompute: true);
            _gpBindingsManager = new TextureBindingsManager(context, channel, texturePoolCache, isCompute: false);

            _rtColors     = new Texture[Constants.TotalRenderTargets];
            _rtHostColors = new ITexture[Constants.TotalRenderTargets];
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of the texture manager.
        /// </summary>
        /// <param name="context">GPU context that the texture manager belongs to</param>
        /// <param name="channel">GPU channel that the texture manager belongs to</param>
        public TextureManager(GpuContext context, GpuChannel channel)
        {
            _context = context;

            TexturePoolCache texturePoolCache = new TexturePoolCache(context);

            float[] scales = new float[64];
            new Span <float>(scales).Fill(1f);

            _cpBindingsManager = new TextureBindingsManager(context, channel, texturePoolCache, scales, isCompute: true);
            _gpBindingsManager = new TextureBindingsManager(context, channel, texturePoolCache, scales, isCompute: false);

            _rtColors     = new Texture[Constants.TotalRenderTargets];
            _rtHostColors = new ITexture[Constants.TotalRenderTargets];
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructs a new instance of the texture manager.
        /// </summary>
        /// <param name="context">The GPU context that the texture manager belongs to</param>
        public TextureManager(GpuContext context)
        {
            _context = context;

            TexturePoolCache texturePoolCache = new TexturePoolCache(context);

            _cpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: true);
            _gpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: false);

            _rtColors = new Texture[Constants.TotalRenderTargets];

            _rtHostColors = new ITexture[Constants.TotalRenderTargets];

            _textures = new RangeList <Texture>();

            _textureOverlaps = new Texture[OverlapsBufferInitialCapacity];

            _cache = new AutoDeleteCache();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructs a new instance of the texture manager.
        /// </summary>
        /// <param name="context">The GPU context that the texture manager belongs to</param>
        public TextureManager(GpuContext context)
        {
            _context = context;

            TexturePoolCache texturePoolCache = new TexturePoolCache(context);

            _cpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: true);
            _gpBindingsManager = new TextureBindingsManager(context, texturePoolCache, isCompute: false);

            _rtColors = new Texture[Constants.TotalRenderTargets];

            _rtHostColors = new ITexture[Constants.TotalRenderTargets];

            _textures = new RangeList <Texture>();

            _textureOverlaps = new Texture[OverlapsBufferInitialCapacity];
            _overlapInfo     = new OverlapInfo[OverlapsBufferInitialCapacity];

            _cache = new AutoDeleteCache();

            _modified       = new HashSet <Texture>(new ReferenceEqualityComparer <Texture>());
            _modifiedLinear = new HashSet <Texture>(new ReferenceEqualityComparer <Texture>());
        }