GLM: function taking degrees as a parameter is deprecated (WHEN USING RADIANS)

一笑奈何 提交于 2019-12-02 02:18:57
#define degreesToRadians(x) x*(3.141592f/180.0f)

the static part should be resolved at compile time by the compiler, just surround any degrees to glm stuff with that macro and you are done. Also add

#define GLM_FORCE_RADIANS

before including and glm headers, so that it will by default use radians instead of degrees

alexX AleX alexge50

Instead of manual transformation you can use

glm::radians(degrees) // from degrees to radians. 

Or

glm::degrees(radians) // from radians to degrees. 

For further information about glm's trigonometry functions consult this page: http://glm.g-truc.net/0.9.4/api/a00136.html#ga4fb76e28851c9ff6653532566084e091

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!