glm 中 数据类型 与 原始数据(c++ 数组)之间的转换

来源:互联网 发布:mac用预览编辑pdf文件 编辑:程序博客网 时间:2024/06/05 18:31

float* -> glm::vec3


float g_AxisDirection[] = {0.0f, 1.0f, 0.0f};

glm::make_vec3(g_AxisDirection)



glm::mat4->float*


glm::mat4 Rx = glm::mat4(1);

(float*)glm::value_ptr(Rx)

0 0