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=3c8418e796a54301beaa782b677f832c300b9da8;hb=HEAD;hp=1b233802369f90db6cfac7af358b466ba70d3373;hpb=6c62f5aa91b434193d0fc11b7763ba7286372fc4;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..3c8418e 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) 2023 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,29 @@ namespace Dali { -TestGraphicsProgram::TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats) -: mGl(gl), +TestGraphicsProgramImpl::TestGraphicsProgramImpl(TestGraphicsController& controller, TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats, std::vector& customUniforms, std::vector& customUniformBlocks) +: mController(controller), + mGl(gl), + mId(gl.CreateProgram()), mCreateInfo(createInfo), - mReflection(gl, vertexFormats) + mReflection(controller, gl, mId, vertexFormats, createInfo, customUniforms, customUniformBlocks) { - 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