问题描述
Apple 在 10.6 Mac OS X 固件更新中添加了新的 IOSurface 框架.由于这个框架相对较新,我还没有找到关于如何正确使用它的急需文档.
Apple added the new IOSurface framework as part of the 10.6 Mac OS X firm update. Since this framework relatively new, I haven't found the much need documentation on how to properly use this.
我想知道 StackOverflow 上是否有人可以帮助我使用 IOSurface.
I was wondering if there anyone on StackOverflow that can assist me with IOSurface usage.
无论如何,这就是我想做的.现在我的应用程序非常简单,因此我可以熟悉 IOSurfaces.所以本质上,我想将图像加载到 IOSurface 纹理中并在自定义 OpenGLView 中显示.这就是我目前的目标.
Anyways, this is what I want to do. Right now my application is very simple so that I can become familiar with IOSurfaces. So essentially, I would want to load up an image into an IOSurface texture and display in a custom OpenGLView. That's all I am aiming for at this point.
为了使这更简单,我只在 IOSurface 中加载一种常量颜色.我此时的主要目标是创建一个 IOSurface 引用并在自定义 OpenGL 视图中显示.
To make this more simple, I just load one constant color in the IOSurface. My main objective at this point is to create an IOSurface reference and display in a custom OpenGL view.
请帮帮我-IOSurface声明声明- 将数据加载到 IOSurface- 以及在 OpenGL 中绘制 IOSurface 的语法.
Please help me with -IOSurface declaration statements -Loading data into the IOSurface -and the syntax for drawing the IOSurface in OpenGL.
非常感谢.
附言
IOSurface 就像一个内存管理器,在应用程序之间传递图形数据或类似的东西.
IOSurface is like a memory manager that passes graphic data between applications or something a long the line of that.
我已经尝试过 Google IOSurface.最有帮助的网站是
I have tried Google IOSurface. And the most helpful site is
http://cocoadhoc.blogspot.com/2009/09/hidden-gems-of-snow-leopard-iosurface.html
但是,当我尝试编译示例代码时,我遇到了一个编译器错误,指出 QTVisualContextRef 和其他 QuickTime 变量未声明.我通过自动更新获得了最新版本的 Quick Time.
However, when I tried compile the example code, I have a compiler error stating that QTVisualContextRef and other QuickTime variables undeclared. I have the latest version of Quick Time through the automatic update.
推荐答案
IOSurface API 与 Core Video 的 CVPixelBuffer 非常相似,有文档说明,所以你可以从 CVPixelBuffer 文档并与 IOSurfaceAPI.h 进行比较.
The IOSurface API is quite similar to Core Video's CVPixelBuffer, which is documented, so you could start by looking at the CVPixelBuffer documentation and comparing with IOSurfaceAPI.h.
要将 OpenGL 纹理绑定到 IOSurface,请参阅在 <OpenGL/CGLIOSurface.h> 中定义的 CGLtexImageIOSurface2D 函数.
To bind an OpenGL texture to an IOSurface, see the CGLTexImageIOSurface2D function, which is defined in <OpenGL/CGLIOSurface.h>.
这篇关于如何在 OpenGL 中为 Mac OS X Snow Leopard 应用程序加载 IOSurface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


 大气响应式网络建站服务公司织梦模板
大气响应式网络建站服务公司织梦模板 高端大气html5设计公司网站源码
高端大气html5设计公司网站源码 织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选) 财税代理公司注册代理记账网站织梦模板(带手机端)
财税代理公司注册代理记账网站织梦模板(带手机端) 成人高考自考在职研究生教育机构网站源码(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端) 高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)