X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Frenderers%2Frender-renderer.cpp;h=b76c15f234ee1a2750cd78210e332979820eebba;hb=5667076dada6054ae180aebcfeb1a66954e7f223;hp=9c8dd47c889d317e1cd966adaff9894a4697b417;hpb=f19e582fe69147df2e753162086b2d18611b12ae;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/renderers/render-renderer.cpp b/dali/internal/render/renderers/render-renderer.cpp index 9c8dd47..b76c15f 100644 --- a/dali/internal/render/renderers/render-renderer.cpp +++ b/dali/internal/render/renderers/render-renderer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -229,10 +229,14 @@ void Renderer::BindTextures(Graphics::CommandBuffer& commandBuffer, Vector(textures->Count()); ++i) // not expecting more than uint32_t of textures + const std::uint32_t texturesCount(static_cast(textures->Count())); + textureBindings.reserve(texturesCount); + + for(uint32_t i = 0; i < texturesCount; ++i) // not expecting more than uint32_t of textures { if((*textures)[i] && (*textures)[i]->GetGraphicsObject()) { + Graphics::Texture* graphicsTexture = (*textures)[i]->GetGraphicsObject(); // if the sampler exists, // if it's default, delete the graphics object // otherwise re-initialize it if dirty @@ -241,8 +245,8 @@ void Renderer::BindTextures(Graphics::CommandBuffer& commandBuffer, VectorGetGraphicsObject()); - const Graphics::TextureBinding textureBinding{(*textures)[i]->GetGraphicsObject(), graphicsSampler, textureUnit}; + boundTextures.PushBack(graphicsTexture); + const Graphics::TextureBinding textureBinding{graphicsTexture, graphicsSampler, textureUnit}; textureBindings.push_back(textureBinding); ++textureUnit;