X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-graphics-program.cpp;h=8f2e0c73e0e0b953001b44e3a8f658af6ca33a73;hb=abc8459e18c5a7f8730c9493885fd067126520cb;hp=1b233802369f90db6cfac7af358b466ba70d3373;hpb=3807953d55f788a41339af3da14822c2c01c32e4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-program.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-program.cpp index 1b23380..8f2e0c7 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-program.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-program.cpp @@ -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. @@ -18,20 +18,28 @@ namespace Dali { -TestGraphicsProgram::TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats) +TestGraphicsProgramImpl::TestGraphicsProgramImpl(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats, std::vector& customUniforms) : mGl(gl), + mId(gl.CreateProgram()), mCreateInfo(createInfo), - mReflection(gl, vertexFormats) + mReflection(gl, mId, vertexFormats, createInfo, customUniforms) { - mId = 0;//mGl.CreateProgram(); + // Ensure active sampler uniforms are set + mGl.SetCustomUniforms(customUniforms); + + // Don't need to re-register uniforms in GL side - now done in creation of mReflection. + // Was previously done in mGl.LinkProgram(mId); } -bool TestGraphicsProgram::GetParameter(uint32_t parameterId, void* outData ) +bool TestGraphicsProgramImpl::GetParameter(uint32_t parameterId, void* outData) { reinterpret_cast(outData)[0] = mId; return true; } - +TestGraphicsProgram::TestGraphicsProgram(TestGraphicsProgramImpl* impl) +{ + mImpl = impl; +} } // namespace Dali