// Create render target for the scene
Graphics::RenderTargetCreateInfo rtInfo{};
rtInfo.SetExtent({mSurfaceWidth, mSurfaceHeight});
- rtInfo.SetSurface(&mSurfaceWidth); // Can point to anything, really.
-
+ rtInfo.SetSurface(reinterpret_cast<Integration::RenderSurface*>(this));
mScene.SetSurfaceRenderTarget(rtInfo);
mScenes.push_back(mScene);
const Texture* texture; // texture to be bound
const Sampler* sampler; // sampler to be bound
uint32_t binding; // binding index
+ auto& SetTexture( const Texture* _texture )
+ {
+ texture = _texture;
+ return *this;
+ }
+ auto& SetBinding( uint32_t _binding )
+ {
+ binding = _binding;
+ return *this;
+ }
+ auto& SetSampler( const Sampler* _sampler )
+ {
+ sampler = _sampler;
+ return *this;
+ }
};
/**
#define DALI_GRAPHICS_RENDERPASS_CREATE_INFO_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
return *this;
}
+ /**
+ * @brief Set the render target for this render pass
+ *
+ * @param[in] value The render target to use.
+ * @return reference to this structure.
+ */
+ auto& SetRenderTarget(RenderTarget* value)
+ {
+ renderTarget = value;
+ return *this;
+ }
+
/**
* @brief Sets allocation callbacks which will be used when object is created
* and destroyed.
GraphicsStructureType type{GraphicsStructureType::RENDERPASS_CREATE_INFO_STRUCT};
ExtensionCreateInfo* nextExtension{nullptr};
const std::vector<AttachmentDescription>* attachments{nullptr};
+ RenderTarget* renderTarget{nullptr};
const AllocationCallbacks* allocationCallbacks{nullptr};
};
#define DALI_GRAPHICS_RENDER_TARGET_CREATE_INFO
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
namespace Dali
{
+namespace Integration
+{
+struct RenderSurface;
+}
namespace Graphics
{
/**
* @param[in] value Pointer to the native surface
* @return reference to this structure
*/
- auto& SetSurface( Surface* value )
+ auto& SetSurface( Integration::RenderSurface* value )
{
surface = value;
return *this;
}
GraphicsStructureType type{GraphicsStructureType::RENDER_TARGET_CREATE_INFO_STRUCT};
- Surface* surface{nullptr};
+ Integration::RenderSurface* surface{nullptr};
Framebuffer* framebuffer{nullptr};
Extent2D extent{};
RenderTargetTransformFlags preTransform{0u};
void (*deleteFunction)(T* object){nullptr}; ///< Custom delete function
};
-/**
- * Surface type is just a void* to any native object.
- */
-using Surface = void;
-
/**
* @brief Enum describing preTransform of render target
*/