示例#1
0
        public override void render(RenderSupport support, float parentAlpha)
        {
            float alpha       = parentAlpha * this.alpha;
            int   numChildren = mChildren.Count;


            for (int i = 0; i < numChildren; ++i)
            {
                DisplayObjectX child = mChildren[i];

                if (child.hasVisibleArea)
                {
                    child.sceneTransform = Transform2X.multiply(mSceneTransform, child.transform);
                    support.blendMode    = child.blendMode;

//                    if (filter)
//                    {
//                        filter.render(child, support, alpha);
//                    }
//                    else
//                    {
                    child.render(support, alpha);
//                    }

                    support.blendMode = blendMode;
                }
            }
        }
示例#2
0
        public override void render(RenderSupport support, float parentAlpha)
        {
            int len = vertices.Length;

            for (int i = 0; i < len; i++)
            {
                translatorVertices[i] = mSceneTransform.transformVector(vertices[i]);
            }
            support.batchQuad(this, parentAlpha, null);
        }
        protected override void Start()
        {
            Debug.Log("start GUIRouter");

            if (renderSupport != null)
            {
                return;
            }
            renderSupport = new RenderSupport();
            base.Start();

            _stage = new StageX();
            sceneMachine.target = _stage;
        }
示例#4
0
        public override void render(RenderSupport support, float parentAlpha)
        {
            float aspect = (float)stageWidth / stageHeight;

            mSceneTransform.a = 2.0f / stageWidth * aspect;
            mSceneTransform.d = -2.0f / stageHeight;

            mSceneTransform.tx = -aspect;
            mSceneTransform.ty = 1;

            base.render(support, parentAlpha);

            //Camera
        }
        public void render(int drawCall, RenderSupport renderSupport)
        {
            if (mNumQuads == 0)
            {
                return;
            }

            MeshFilter   meshFilter;
            MeshRenderer renderer;
            Mesh         mesh;

            if (go == null)
            {
                go         = new GameObject("crl");
                go.layer   = LayerMask.NameToLayer("UI");
                meshFilter = go.AddComponent <MeshFilter>();
                renderer   = go.AddComponent <MeshRenderer>();

                go.transform.parent = renderSupport.uiRoot.transform;

                go.transform.localPosition = Vector3.zero;
            }
            else
            {
                meshFilter = go.GetComponent <MeshFilter>();
                renderer   = go.GetComponent <MeshRenderer>();
            }

            mesh = meshFilter.mesh;
            //mesh.Clear();

            int len = vertices.Count;

            Vector3[] verticeList = new Vector3[len];
            Vector3X  tempV3;

            for (int i = 0; i < len; i++)
            {
                tempV3         = vertices[i];
                verticeList[i] = new Vector3(tempV3.x, tempV3.y, tempV3.z);
            }
            len = uvs.Count;
            Vector2[] uvList = new Vector2[len];
            Vector2X  tempV2;

            for (int i = 0; i < len; i++)
            {
                tempV2    = uvs[i];
                uvList[i] = new Vector2(tempV2.x, tempV2.y);
            }
            mesh.vertices = verticeList;
            mesh.uv       = uvList;
            mesh.colors32 = colors.ToArray();

            mesh.triangles = createIndices(vertices.Count);


            Material material = renderer.material;

            material.renderQueue = drawCall + 6000;
            material.shader      = _shader;
            material.color       = new Color(1, 1, 1, 1);
            if (_texture != null)
            {
                material.mainTexture = _texture;
            }
        }
示例#6
0
 public override void render(RenderSupport support, float parentAlpha)
 {
     support.batchQuad(this, parentAlpha, _texture);
 }
示例#7
0
 public virtual void render(RenderSupport support, float parentAlpha)
 {
 }