Esempio n. 1
0
    //@ Rendered 1Drawcall Mesh for debug order by IV array.
    //  -fEpsilonForZFight : For not to hide or override, give it to some hovering space.
    public int DrawNewRendermeshIV(int iIDX_, Vector3[] arrV3VB, int[] arriIV, Color colorUser_, float fEpsilonForZFight, float fScale)
    {
        DeleteDrawMesh(iIDX_);

        GameObject       gorendermeshSource = new GameObject();
        CRenderMeshDebug renderMeshNew      = gorendermeshSource.AddComponent <CRenderMeshDebug>();

        renderMeshNew.DrawMesh_user(iIDX_, arrV3VB, arriIV, colorUser_, fScale, fEpsilonForZFight);

        m_listRenderMesh.Add(renderMeshNew);

        return(m_listRenderMesh.Count - 1);
    }
Esempio n. 2
0
    //@ Rendered 1Drawcall Mesh for debug order by Sequencial VB array.
    public int DrawNewRendermesh(int iIDX_, Vector3[] arrV3VB, Color colorUser_, float fEpsilonForZFight, float fScale)
    {
        if (null == m_renderMeshSource)
        {
            return(-1);
        }
        CRenderMeshDebug renderMeshNew = (CRenderMeshDebug)GameObject.Instantiate(m_renderMeshSource);

        DeleteDrawMesh(iIDX_);

        int[] arriIV_ = new int[arrV3VB.Length];
        for (int iIV = 0; iIV < arriIV_.Length; ++iIV)
        {
            arriIV_[iIV] = iIV;
        }

        renderMeshNew.DrawMesh_user(iIDX_, arrV3VB, arriIV_, colorUser_, fScale, fEpsilonForZFight);

        m_listRenderMesh.Add(renderMeshNew);

        return(iIDX_);
    }