Jump to content
  • Advertisement
Sign in to follow this  
Thanhda

OpenGL 'pow' : 7 overloads Error help.

This topic is 4879 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay i have the OpenGL book from glbook.gamedev.net terrain.cpp(255): error C2666: 'pow' : 7 overloads have similar conversions float dh = (float)rectSize/2,r = (double)pow(2,-1*rough); appearently it works fine in vc6. but not in vc7, i dont know why. not sure if i should be posting here, but it is a gl book.

Share this post


Link to post
Share on other sites
Advertisement
For VS7, I think you will need to do something like:
r = (double)std::pow( (double)2,(double)(-1*rough));
I don't have VS7 to test it on at the moment though... Good luck!

Share this post


Link to post
Share on other sites
nice it works.

original:
float dh = (float)rectSize/2,
float r = (float)pow(2,-1*rough);

Correction:
float dh = (float)rectSize/2;
float r = (double)pow( (double)2,(double)(-1*rough));

thanks again.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!