示例#1
0
        public UIRStylePainter(RenderChain renderChain)
        {
            this.m_Owner = renderChain;
            this.< meshGenerationContext > k__BackingField = new MeshGenerationContext(this);
            this.< device > k__BackingField     = renderChain.device;
            this.m_AtlasManager                 = renderChain.atlasManager;
            this.m_VectorImageManager           = renderChain.vectorImageManager;
            this.m_AllocRawVertsIndicesDelegate = new MeshBuilder.AllocMeshData.Allocator(this.AllocRawVertsIndices);
            this.m_AllocThroughDrawMeshDelegate = new MeshBuilder.AllocMeshData.Allocator(this.AllocThroughDrawMesh);
            int num = 32;

            this.m_MeshWriteDataPool = new List <MeshWriteData>(num);
            for (int i = 0; i < num; i++)
            {
                this.m_MeshWriteDataPool.Add(new MeshWriteData());
            }
        }
        public UIRStylePainter(RenderChain renderChain)
        {
            m_Owner = renderChain;
            meshGenerationContext = new MeshGenerationContext(this);
            device  = renderChain.device;
            m_Atlas = renderChain.atlas;
            m_VectorImageManager                = renderChain.vectorImageManager;
            m_AllocRawVertsIndicesDelegate      = AllocRawVertsIndices;
            m_AllocThroughDrawMeshDelegate      = AllocThroughDrawMesh;
            m_AllocThroughDrawGradientsDelegate = AllocThroughDrawGradients;
            int meshWriteDataPoolStartingSize = 32;

            m_MeshWriteDataPool = new List <MeshWriteData>(meshWriteDataPoolStartingSize);
            for (int i = 0; i < meshWriteDataPoolStartingSize; i++)
            {
                m_MeshWriteDataPool.Add(new MeshWriteData());
            }
        }