I've recently updated to the latest revision of SFML eager to try out the new shader uniform settings (particularly the ability to set arrays of data) and run into the following problem when trying to set a matrix parameter with sf::Transform:
int main()
{
sf::Shader shader;
shader.loadFromMemory(xy::Shader::NormalMapped::vertex, xy::Shader::NormalMapped::fragment);
sf::Transform tx;
shader.setUniform("u_inverseWorldViewMat", tx);
return 0;
}
won't compile because 'setUniform(const std::string&, sf::Glsl::Mat3&) and setUniform(const std::string&, sf::Glsl::Mat4&) are ambiguous', and
int main()
{
sf::Shader shader;
shader.loadFromMemory(xy::Shader::NormalMapped::vertex, xy::Shader::NormalMapped::fragment);
sf::Transform tx;
shader.setUniform("u_inverseWorldViewMat", sf::Glsl::Mat4(tx));
return 0;
}
gives me:
Error LNK2001 unresolved external symbol "void __cdecl sf::priv::copyMatrix(class sf::Transform const &,struct sf::priv::Matrix<4,4> &)" (?copyMatrix@priv@sf@@YAXABVTransform@2@AAU?$Matrix@$03$03@12@@Z) Example C:\Users\Documents\Visual Studio 2015\Projects\xygine\Example\main.obj 1
Clean build and install of SFML using the latest revision with Visual Studio 2015 Community, Windows 7 Pro 64bit. I can see the function in question in Glsl.cpp which is included in the solution generated by CMake, so I'm not sure why it should be unresolved. The old setParameter() functions work fine.