*/
// INTERNAL INCLUDES
-#include <dali/public-api/actors/sampling.h>
#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/rendering/sampler.h>
+#include <dali/public-api/object/property.h>
#include <dali/graphics-api/graphics-types.h>
#include <dali/internal/common/const-string.h>
#include <dali/internal/common/owner-pointer.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-sampler.h>
+#include <dali/internal/render/renderers/gpu-buffer.h>
namespace Dali
{
void SetData(Dali::Vector<uint8_t>* data, uint32_t size);
/**
- * @brief Set the number of elements
- * @param[in] size The number of elements
- */
- void SetSize(uint32_t size);
-
- /**
* Perform the upload of the buffer only when required
* @param[in] graphicsController The controller
*/
* Get the number of attributes present in the buffer
* @return The number of attributes stored in this buffer
*/
- inline uint32_t GetAttributeCount() const
+ [[nodiscard]] inline uint32_t GetAttributeCount() const
{
DALI_ASSERT_DEBUG(mFormat && "Format should be set ");
return static_cast<uint32_t>(mFormat->components.size());
* @param[in] index The index of the attribute
* @return The name of the attribute
*/
- inline ConstString GetAttributeName(uint32_t index) const
+ [[nodiscard]] inline ConstString GetAttributeName(uint32_t index) const
{
DALI_ASSERT_DEBUG(mFormat && "Format should be set ");
return mFormat->components[index].name;
* Retrieve the size of the buffer in bytes
* @return The total size of the buffer
*/
- inline uint32_t GetDataSize() const
+ [[nodiscard]] inline uint32_t GetDataSize() const
{
DALI_ASSERT_DEBUG(mFormat && "Format should be set ");
return mFormat->size * mSize;
* Retrieve the size of one element of the buffer
* @return The size of one element
*/
- inline uint32_t GetElementSize() const
+ [[nodiscard]] inline uint32_t GetElementSize() const
{
DALI_ASSERT_DEBUG(mFormat && "Format should be set ");
return mFormat->size;
* Retrieve the number of elements in the buffer
* @return The total number of elements
*/
- inline uint32_t GetElementCount() const
+ [[nodiscard]] inline uint32_t GetElementCount() const
{
return mSize;
}
- /**
- * Retrieve reference to the data storage vector
- * @return Reference to the data storage
- */
- inline const Dali::Vector<uint8_t>& GetData() const
- {
- return *mData.Get();
- }
-
- /**
- * Retrieve data writeable pointer ( direct access to the buffer data )
- * @return Pointer to data converted to requested type
- */
- template<typename T>
- inline T* GetDataTypedPtr()
- {
- Dali::Vector<uint8_t>* data = mData.Release();
- mData = data;
- return reinterpret_cast<T*>(&data->operator[](0));
- }
-
- inline const VertexBuffer::Format* GetFormat() const
+ [[nodiscard]] inline const VertexBuffer::Format* GetFormat() const
{
return mFormat.Get();
}
- inline const GpuBuffer* GetGpuBuffer() const
+ [[nodiscard]] inline const GpuBuffer* GetGpuBuffer() const
{
return mGpuBuffer.Get();
}