如何获取 Google Native Client 的 3D 上下文
自从 Chromium/Native Client 改用 PPAPI 2 以来,获取 3D 上下文就被破坏了。我可以链接并编译我的应用程序(广泛使用 OpenGL ES 2),一切正常......除了获取要绘制的 3D 上下文之外。我的问题与这篇机器学习帖子中的问题完全相同。这个问题至少存在于 NaCl SDK 2 和 3,以及 chrome 11 和 12 中。现在我知道,由于 API 的更改,目前根本不支持 gl。然而,我相信还有其他项目正在积极致力于 NaCl 的 3D 端口(例如 Unity),我认为他们有一些拼凑来获取上下文。当然,也有可能他们正在使用旧版本的 Chrome/NaCl 进行开发,或者他们已经暂停开发,直到 API 赶上。
基本上,我的问题是,是否可以使用任何拼凑来获取与 opengl es 2 一起使用的 3D 上下文?
Ever since Chromium/Native Client have switched to using PPAPI 2, obtaining a 3D context is broken. I can link and compile my application (which uses OpenGL ES 2 extensively), everything works ... except obtaining a 3D context to draw on. My problems are exactly the same as in this ML post. This problem exists at least with NaCl SDK 2, and 3, both with chrome 11, and 12. Now I know because of the API changes, gl is simply not supported at the moment. However, I believe there are other projects actively working on 3D ports to NaCl (ex. Unity), and I assume they have some kludge to obtain the context. Of course it is also possible that they are developing with an old version of Chrome/NaCl, or that they have put development on hold until the API catches up.
Basically, my question is, is there any kludge I can use to obtain the 3D context to use with opengl es 2?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的,当 NaCL 转向胡椒时,它破坏了(并放入开发中)3D API。然而,对于较新版本的 SDK(针对 Chrome / PPAPI 16 及更高版本的版本),此功能再次有效。
NaclSDK 的最新版本有一个名为 Tumbler 的简单 3D 示例,它有一个 OpenGLContext 类,它展示了如何让 3D 上下文在较新版本的 Native Client 中工作。
You're right, when NaCL moved to pepper it broke (and put into Dev) the 3D API. However with newer versions of the SDK (those targeting Chrome / PPAPI 16 and up) this is working again.
More recent versions of the NaclSDK's have a simple 3D sample called Tumbler, which has a class OpenGLContext, which shows how to get your 3D context working in newer versions of Native Client.