예제 #1
0
 internal void Begin(Matrix4x4 matrix)
 {
     _matrix         = matrix;
     _currentMesh    = null;
     _currentTexture = null;
     renderQueue     = 0;
 }
예제 #2
0
        private void BeginNewMesh(Texture2D texture)
        {
            if (_currentMesh != null)
            {
                _currentMesh.Flush(_currentTexture, shader, _matrix, layer, renderQueue);
            }

            var meshIndex = _meshes.IndexOf(_currentMesh) + 1;

            if (meshIndex == _meshes.Count)
            {
                _meshes.Add(new DrawBatchMesh());
            }

            _currentMesh    = _meshes[meshIndex];
            _currentTexture = texture;
            renderQueue    += 1;
        }