1 #ifndef DALI_GRAPHICS_RENDER_TARGET_CREATE_INFO
2 #define DALI_GRAPHICS_RENDER_TARGET_CREATE_INFO
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include "graphics-render-target.h"
26 #include "graphics-types.h"
33 * @brief Describes specification of new render target.
35 * RenderTarget represents any presentable graphics output.
37 struct RenderTargetCreateInfo
40 * @brief Sets pointer to the extension
42 * The pointer to the extension must be set either to nullptr
43 * or to the valid structure. The structures may create
44 * a chain. The last structure in a chain must point at
47 * @param[in] value pointer to the valid extension structure
48 * @return reference to this structure
50 auto& SetNextExtension(ExtensionCreateInfo* value)
52 nextExtension = value;
57 * @brief Sets surface associated with the RenderTarget
59 * The surface is a a pointer to any native surface object.
61 * @param[in] value Pointer to the native surface
62 * @return reference to this structure
64 auto& SetSurface( Surface* value )
71 * @brief Sets framebuffer associated with the RenderTarget
73 * The framebuffer and surface must not be set together.
75 * @param[in] value Pointer to the Framebuffer object
76 * @return reference to this structure
78 auto& SetFramebuffer( Framebuffer* value )
85 * @brief Sets render target size
87 * @param[in] value Size of render target
88 * @return reference to this structure
90 auto& SetExtent( Extent2D value )
97 * @brief Sets pre-transform of the render target
99 * @param[in] value transform flags
100 * @return reference to this structure
102 auto& SetPreTransform( RenderTargetTransformFlags value )
104 preTransform = value;
109 * @brief Sets allocation callbacks which will be used when object is created
112 * @param[in] value Valid reference to AllocationCallbacksStructure
113 * @return reference to this structure
115 auto& SetAllocationCallbacks(const AllocationCallbacks& value)
117 allocationCallbacks = &value;
121 GraphicsStructureType type{GraphicsStructureType::RENDER_TARGET_CREATE_INFO_STRUCT};
122 Surface* surface{nullptr};
123 Framebuffer* framebuffer{nullptr};
125 RenderTargetTransformFlags preTransform{0u};
126 ExtensionCreateInfo* nextExtension{nullptr};
128 const AllocationCallbacks* allocationCallbacks{nullptr};
131 } // namespace Graphics
133 #endif //DALI_GRAPHICS_RENDER_TARGET_CREATE_INFO