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

后端 未结 2 354
时光取名叫无心
时光取名叫无心 2021-01-22 21:12

Currently using VC++ 11 with SDL2, GLM, and GLEW. The issue is stemming from GLM when I attempt to do two things: Create a rotation matrix, create a perspective camera matrix (3

2条回答
  •  失恋的感觉
    2021-01-22 21:37

    #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

提交回复
热议问题