I have this:
float xExponential = pow(xPingPong, 5);
And is not working, claiming:
ERROR: 0:53: No matching overload for call to function 'pow'
Am I doin' something wrong? Developing for iOS with OpenGL ES 2.0.
I have this:
float xExponential = pow(xPingPong, 5);
And is not working, claiming:
ERROR: 0:53: No matching overload for call to function 'pow'
Am I doin' something wrong? Developing for iOS with OpenGL ES 2.0.
Can you try this ?
float xExponential = pow(xPingPong, 5.0);
Your code is fine just syntax error
Write upto decimal digit
float xExponential = pow(xPingPong, 5.0);
or
float xExponential = pow(xPingPong, 5.);
Although accurate answers are provided, it is good to explain why those answers work.
float xExponential = pow(xPingPong, 5.0);
GLSL is strongly typed. 1, 2, 3, etc. are considered int. GLSL pow function expects a float value. Thus, you need to convert your power to float. 1.
, 1.0
, 1.f
, 1.0f
, etc. are treated as float values.
Hope this helps.
© 2022 - 2024 — McMap. All rights reserved.