X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Frenderers%2Frender-geometry.h;h=2f04c973133649a9ca9019ba24804ed03fef1eda;hb=a513234144a775134eff3a24144983a5e374d1d5;hp=429ec1fcd5714171f068b62a87afc28a849fd026;hpb=3aa909145b7d672d0b966d3595b138ed1537b091;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/renderers/render-geometry.h b/dali/internal/render/renderers/render-geometry.h index 429ec1f..2f04c97 100644 --- a/dali/internal/render/renderers/render-geometry.h +++ b/dali/internal/render/renderers/render-geometry.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_RENDER_GEOMETRY_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -20,8 +20,7 @@ // INTERNAL INCLUDES #include #include -#include -#include +#include #include #include #include @@ -46,7 +45,11 @@ class VertexBuffer; class Geometry { public: - using Type = Dali::Geometry::Type; + using Type = Dali::Geometry::Type; + using IndexType = Dali::Graphics::Format; + + using Uint16ContainerType = Dali::Vector; + using Uint32ContainerType = Dali::Vector; Geometry(); @@ -65,7 +68,13 @@ public: * Set the data for the index buffer to be used by the geometry * @param[in] indices A vector containing the indices */ - void SetIndexBuffer(Dali::Vector& indices); + void SetIndexBuffer(Uint16ContainerType& indices); + + /** + * Set the data for the index buffer to be used by the geometry + * @param[in] indices A vector containing the indices + */ + void SetIndexBuffer(Uint32ContainerType& indices); /** * Removes a VertexBuffer from the geometry @@ -88,7 +97,7 @@ public: * Check if the attributes for the geometry have changed * @return True if vertex buffers have been added or removed since last frame, false otherwise */ - [[nodiscard]] bool AttributesChanged() const + [[maybe_unused]] [[nodiscard]] bool AttributesChanged() const { return mAttributesChanged; } @@ -116,7 +125,7 @@ public: * Set up the attributes and perform the Draw call corresponding to the geometry type. * * @param[in] graphicsController The graphics controller - * @param[in] bufferIndex The current buffer index + * @param[in,out] commandBuffer The current command buffer queue * @param[in] elementBufferOffset The index of first element to draw if index buffer bound * @param[in] elementBufferCount Number of elements to draw if index buffer bound, uses whole buffer when 0 * @return true if the draw command was issued, false otherwise @@ -126,12 +135,21 @@ public: uint32_t elementBufferOffset, uint32_t elementBufferCount); + /** + * @brief Set up the attributes bind commaneds + * + * @param[in,out] commandBuffer The current command buffer queue + * @return true if the bind command was issued, false otherwise + */ + bool BindVertexAttributes(Graphics::CommandBuffer& commandBuffer); + private: // VertexBuffers Vector mVertexBuffers; - Dali::Vector mIndices; + Uint16ContainerType mIndices; OwnerPointer mIndexBuffer; + IndexType mIndexType; Type mGeometryType; // Booleans