/*
- * 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.
{
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)