public void GetRenderLayer(out FRenderLayer renderLayer, out int firstFacetIndex, FFacetType facetType, FAtlas atlas, FShader shader, int numberOfFacetsNeeded) { int batchIndex = facetType.index * 10000000 + atlas.index * 10000 + shader.index; if (_topLayer == null) { _topLayer = CreateRenderLayer(facetType, batchIndex, atlas, shader); _topLayer.Open(); } else { if (_topLayer.batchIndex != batchIndex) //we're changing layers! { _topLayer.Close(); //close the old layer _topLayer = CreateRenderLayer(facetType, batchIndex, atlas, shader); _topLayer.Open(); //open the new layer } } renderLayer = _topLayer; firstFacetIndex = _topLayer.GetNextFacetIndex(numberOfFacetsNeeded); }
public void GetRenderLayer(ref FRenderLayer renderLayer, ref int firstQuadIndex, FAtlas atlas, FShader shader, int numberOfQuadsNeeded) { int batchIndex = atlas.index*10000 + shader.index; if(_topLayer == null) { _topLayer = CreateRenderLayer(batchIndex, atlas, shader); _topLayer.Open(); } else { if(_topLayer.batchIndex != batchIndex) //we're changing layers! { _topLayer.Close(); //close the old layer _topLayer = CreateRenderLayer(batchIndex, atlas, shader); _topLayer.Open(); //open the new layer } } renderLayer = _topLayer; firstQuadIndex = _topLayer.GetNextQuadIndex(numberOfQuadsNeeded); }
public void GetRenderLayer(ref FRenderLayer renderLayer, ref int firstQuadIndex, FAtlas atlas, FShader shader, int numberOfQuadsNeeded) { int batchIndex = atlas.index * 10000 + shader.index; if (_topLayer == null) { _topLayer = CreateRenderLayer(batchIndex, atlas, shader); _topLayer.Open(); } else { if (_topLayer.batchIndex != batchIndex) //we're changing layers! { _topLayer.Close(); //close the old layer _topLayer = CreateRenderLayer(batchIndex, atlas, shader); _topLayer.Open(); //open the new layer } } renderLayer = _topLayer; firstQuadIndex = _topLayer.GetNextQuadIndex(numberOfQuadsNeeded); }
public void GetRenderLayer(out FRenderLayer renderLayer, out int firstFacetIndex, FFacetType facetType, FAtlas atlas, FShader shader, int numberOfFacetsNeeded) { int batchIndex = facetType.index*10000000 + atlas.index*10000 + shader.index; if(_topLayer == null) { _topLayer = CreateRenderLayer(facetType, batchIndex, atlas, shader); _topLayer.Open(); } else { if(_topLayer.batchIndex != batchIndex) //we're changing layers! { _topLayer.Close(); //close the old layer _topLayer = CreateRenderLayer(facetType, batchIndex, atlas, shader); _topLayer.Open(); //open the new layer } } renderLayer = _topLayer; firstFacetIndex = _topLayer.GetNextFacetIndex(numberOfFacetsNeeded); }