OGeek|极客世界-中国程序员成长平台

标题: ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 21:53
标题: ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?

GLKit中有一个头文件,注释如下:

GLKMatrixStack is a CFType that allows for the creation of a 4x4 matrix stack similar to OpenGL's matrix stack. Any number of matrix stacks can be created and operated on with functions similar to those found in fixed function versions of OpenGL.

您将如何根据堆栈的内容生成模型 View 矩阵?我在 GLKMatrixStack header 之外找不到对 GLKMatrixStackRef 类型的任何引用。



Best Answer-推荐答案


在 Apple 的 C 库中,Ref 是指向 的指针的 typedef。所以适当的文档是 GLMatrixStack .所以你会使用 GLMatrixStackCreate,然后是 GLMatrixStackRotateGLMatrixStackScaleGLMatrixStackPush/Pop 等的任何组合以及类似的东西GLMatrixStackGetMatrix4 当你想将结果传达给你的着色器时。

关于ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9649980/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4