ios - 如何使用 GLKit 的 GLKMatrixStack 库生成模型 View 矩阵?

标签 ios ios5 opengl-es opengl-es-2.0 glkit

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/

相关文章:

android - 华为8.0 Renderscript加载RS驱动失败

ios - glClear 上的 "invalid framebuffer operation"- 在 OpenGL ES3 中使用 sRGB

ios - 过滤器在 swift 中将搜索栏添加到 Eureka 表单生成器中的 MultiplePushRow

Objective-c:计算一个 NSDictionary 但得到错误的结果

ios - 如何绕过 iOS 5 的 xcode 4.4 中的代码签名?

ios - 当我编译 `GLSL` 代码时,出现错误 'ERROR: 0:15: ' premature EOF' : syntax error syntax error'

ios - SwiftUI - 可重用组件,链接到其他 View 作为参数

ios - 借助核心图形从代码创建具有渐变效果的图像?

ios - 有没有一种方法可以在用户时间轴上自动显示 OpenGraph 操作,而无需他们从事件日志中启用它?

javascript - iOS 获取过去的登录表单。