/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
mCore = Dali::Integration::Core::New(mRenderController,
mPlatformAbstraction,
- mGlAbstraction,
- mGlSyncAbstraction,
- mGlContextHelperAbstraction,
+ mGraphicsController,
Integration::RenderToFrameBuffer::FALSE,
Integration::DepthBufferAvailable::TRUE,
Integration::StencilBufferAvailable::TRUE,
{
mScene = Dali::Integration::Scene::New(Size(static_cast<float>(mSurfaceWidth), static_cast<float>(mSurfaceHeight)));
mScene.SetDpi(Vector2(static_cast<float>(mDpi.x), static_cast<float>(mDpi.y)));
+
+ // Create render target for the scene
+ Graphics::RenderTargetCreateInfo rtInfo{};
+ rtInfo.SetExtent({mSurfaceWidth, mSurfaceHeight});
+ mRenderTarget = mGraphicsController.CreateRenderTarget(rtInfo, nullptr);
+ mScene.SetSurfaceRenderTarget(mRenderTarget.get());
}
void TestApplication::InitializeCore()
return mRenderController;
}
+TestGraphicsController& TestApplication::GetGraphicsController()
+{
+ return mGraphicsController;
+}
+
TestGlAbstraction& TestApplication::GetGlAbstraction()
{
- return mGlAbstraction;
+ return static_cast<TestGlAbstraction&>(mGraphicsController.GetGlAbstraction());
}
TestGlSyncAbstraction& TestApplication::GetGlSyncAbstraction()
{
- return mGlSyncAbstraction;
+ return static_cast<TestGlSyncAbstraction&>(mGraphicsController.GetGlSyncAbstraction());
}
TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction()
{
- return mGlContextHelperAbstraction;
+ return static_cast<TestGlContextHelperAbstraction&>(mGraphicsController.GetGlContextHelperAbstraction());
}
void TestApplication::ProcessEvent(const Integration::Event& event)
void TestApplication::ResetContext()
{
mCore->ContextDestroyed();
- mGlAbstraction.Initialize();
+ mGraphicsController.Initialize();
mCore->ContextCreated();
}