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
类型的引用。
最佳答案
在 Apple 的 C 库中,<whatever>Ref
是指向 <whatever>
的指针的 typedef 。因此,适当的文档是 GLMatrixStack 。所以你会使用GLMatrixStackCreate
,那么 GLMatrixStackRotate
的任意组合, GLMatrixStackScale
, GLMatrixStackPush/Pop
等等,比如 GLMatrixStackGetMatrix4
当您想要将结果传达给着色器时。
关于ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9649980/