2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/public-api/controls/gl-view/gl-view.h>
22 #include <dali-toolkit/internal/controls/gl-view/gl-view-impl.h>
32 GlView::GlView(const GlView& GlView) = default;
34 GlView::GlView(GlView&& rhs) = default;
36 GlView& GlView::operator=(const GlView& GlView) = default;
38 GlView& GlView::operator=(GlView&& rhs) = default;
44 GlView GlView::New(ColorFormat colorFormat)
46 return Internal::GlView::New(colorFormat);
49 GlView GlView::DownCast(BaseHandle handle)
51 return Control::DownCast<GlView, Internal::GlView>(handle);
54 void GlView::RegisterGlCallbacks(CallbackBase* initCallback, CallbackBase* renderFrameCallback, CallbackBase* terminateCallback)
56 Dali::Toolkit::GetImpl(*this).RegisterGlCallbacks(initCallback, renderFrameCallback, terminateCallback);
59 void GlView::SetResizeCallback(CallbackBase* resizeCallback)
61 Dali::Toolkit::GetImpl(*this).SetResizeCallback(resizeCallback);
64 bool GlView::SetGraphicsConfig(bool depth, bool stencil, int msaa, GraphicsApiVersion version)
66 return Dali::Toolkit::GetImpl(*this).SetGraphicsConfig(depth, stencil, msaa, version);
69 void GlView::SetRenderingMode(RenderingMode mode)
71 Dali::Toolkit::GetImpl(*this).SetRenderingMode(mode);
74 Dali::Toolkit::GlView::RenderingMode GlView::GetRenderingMode() const
76 return Dali::Toolkit::GetImpl(*this).GetRenderingMode();
79 void GlView::RenderOnce()
81 Dali::Toolkit::GetImpl(*this).RenderOnce();
84 GlView::GlView(Internal::GlView& implementation)
85 : Control(implementation)
89 GlView::GlView(Dali::Internal::CustomActor* internal)
92 VerifyCustomActorPointer<Internal::GlView>(internal);
95 } // namespace Toolkit