Syncing Test harness updates
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-program.cpp
index 1b23380..9a0afa6 100644 (file)
 
 namespace Dali
 {
-TestGraphicsProgram::TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats)
+TestGraphicsProgramImpl::TestGraphicsProgramImpl(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats)
 : mGl(gl),
   mCreateInfo(createInfo),
   mReflection(gl, vertexFormats)
 {
-  mId = 0;//mGl.CreateProgram();
+  mId = mGl.CreateProgram();
+  mGl.LinkProgram(1); // Ensure active sampler uniforms are set
 }
 
-bool TestGraphicsProgram::GetParameter(uint32_t parameterId, void* outData )
+bool TestGraphicsProgramImpl::GetParameter(uint32_t parameterId, void* outData)
 {
   reinterpret_cast<uint32_t*>(outData)[0] = mId;
   return true;
 }
 
+TestGraphicsProgram::TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats)
+{
+  mImpl = new TestGraphicsProgramImpl(gl, createInfo, vertexFormats);
+}
 
+TestGraphicsProgram::TestGraphicsProgram(TestGraphicsProgramImpl* impl)
+{
+  mImpl = impl;
+}
 
 } // namespace Dali