Re-instating test cases from old graphics backend
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-program.cpp
index a994157..8f2e0c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -20,14 +20,15 @@ namespace Dali
 {
 TestGraphicsProgramImpl::TestGraphicsProgramImpl(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats, std::vector<UniformData>& customUniforms)
 : mGl(gl),
+  mId(gl.CreateProgram()),
   mCreateInfo(createInfo),
-  mReflection(gl, vertexFormats, createInfo, customUniforms)
+  mReflection(gl, mId, vertexFormats, createInfo, customUniforms)
 {
-  mId = mGl.CreateProgram();
-
   // Ensure active sampler uniforms are set
   mGl.SetCustomUniforms(customUniforms);
-  mGl.LinkProgram(mId);
+
+  // Don't need to re-register uniforms in GL side - now done in creation of mReflection.
+  // Was previously done in mGl.LinkProgram(mId);
 }
 
 bool TestGraphicsProgramImpl::GetParameter(uint32_t parameterId, void* outData)