本文介绍了在 iOS 上学习 OpenGLES 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 OpenGL ES 2.0 的初学者,我正在寻找一本可以帮助我学习的好书/资源.我找到了几本书:

I'm a beginner with OpenGL ES 2.0 and I'm looking for a good book/resource that will help me with my learning. I've found several books:

  • OpenGL® ES 2.0 编程指南
  • iPhone 3D 编程:使用 OpenGL ES 开发图形应用程序

但在阅读亚马逊评论时,我看到他们要么假设以前了解 OpenGL,要么不是专门为 iOS 编写的.(我知道 OpenGL 应该很容易移植,但我正在寻找一本书/资源,其中包含 C 而非 C++ 中的示例,用于讨论 iOS 上下文中的 OpenGL)

but reading the Amazon reviews I saw that they either assume previous knowledge with OpenGL or are not written specifically for iOS. (I know OpenGL should be easy to port, but I'm looking for a book/resource with examples in C, not C++, that talks about OpenGL in the iOS context)

我还发现了 这个,真的帮助我掌握了基本概念,但不幸的是,它们涵盖了 OpenGL ES 1.1,并且仅描述了基础知识.

I also found this and it really helped me getting a grasp on the basic concepts, but unfortunately, they cover OpenGL ES 1.1 and are only describing the basics.

任何帮助将不胜感激!

推荐答案

比一年前更容易找到适用于 iOS(或任何操作系统)的 OpenGL ES 2.0 材料.

It's a lot easier to find OpenGL ES 2.0 material for iOS (or any OS, really) than it used to be a year or so ago.

对于从纯 iOS 角度编写的内容,很难击败 Jeff LaMarche 未出版的书中的章节,该书以 这里.您链接到他的 OpenGL ES 1.1 教程,这些教程也很棒,但他没有将他较新的 2.0 材料放在该列表中.

For something written from a pure iOS perspective, it's hard to beat Jeff LaMarche's chapters from his unpublished book, which start here. You linked to his OpenGL ES 1.1 tutorials, which are also great, but he didn't place his newer 2.0 material on that list.

iPhone 3D Programming 是一本涵盖 OpenGL ES 1.1 和 2.0 的好书.它并不假定您了解 OpenGL ES,并且他确实解释了理解他在说什么所需的大量数学和其他基础知识.他在接近尾声时掌握了一些相当先进的技术.然而,他的所有代码都是用 C++ 编写的,而不是 Objective-C,所以对于习惯于 Cocoa 开发的人来说,这可能有点令人不安.尽管如此,OpenGL ES 的核心 C API 是相同的,所以很容易看出发生了什么.

iPhone 3D Programming by Philip Rideout is a great book that covers both OpenGL ES 1.1 and 2.0. It does not assume that you know OpenGL ES, and he does explain a good bit of the math and other fundamentals required to understand what he's talking about. He gets into some pretty advanced techniques towards the end. However, all of his code is in C++, rather than Objective-C, so that may be a little disconcerting for someone used to Cocoa development. Still, the core C API for OpenGL ES is the same, so it's easy to see what's going on.

如果您正在寻找特定的效果,OpenGL着色语言书仍然是您可以参考的主要资源之一.虽然是为桌面 OpenGL 编写的,但那里提供的大多数着色语言和着色器都直接转换为 OpenGL ES 2.0,只需要稍作修改.

If you're looking for particular effects, the OpenGL Shading Language book is still one of the primary resources you can refer to. While written for desktop OpenGL, most of the shading language and shaders presented there translate directly across to OpenGL ES 2.0, with only a little modification required.

书籍 ShaderX6, ShaderX7, GPU ProGPU Pro 2 也有专门介绍 OpenGL ES 2.0 的部分,其中提供了一些在其他地方找不到的渲染和调整提示.不过,那些是更高级(也更昂贵)的书.

The books ShaderX6, ShaderX7, GPU Pro, and GPU Pro 2 also have sections devoted to OpenGL ES 2.0, which provide some rendering and tuning hints that you won't find elsewhere. Those are more advanced (and expensive) books, though.

如果您刚刚开始使用 OpenGL ES 2.0,那么开始使用 GLKit(仅适用于 iOS 5.0)可能不是一个坏主意,它可以简化渲染缓冲区和简单着色器周围的一些常规设置工作 -基于效果.Apple 的 WWDC 2011 视频 在这方面有一些很好的材料,但他们 2009 年和 2010 年的视频(如果你能找到它们,一些可在 apple archive 获得)提供了更多介绍OpenGL ES 2.0 的素材.

If you're just getting started with OpenGL ES 2.0, it might not be a bad idea to start using GLKit (available only on iOS 5.0), which simplifies some of the normal setup chores around your render buffers and simple shader-based effects. Apple's WWDC 2011 videos have some good material on this, but their 2009 and 2010 videos (if you can find them, some are available at apple archive) provide a lot more introductory material around OpenGL ES 2.0.

最后,正如安迪所提到的,我在 iTunes U 课程中教授了一门关于该主题的课程,您可以免费下载 这里.该课程的课程笔记可以在这里找到或下载作为 VoodooPad 文件这里.我警告您,我在 OpenGL ES 2.0 会话中的技术含量非常快,因此您可能想观看上学期的 1.1 会话 这里.我还在 这篇文章关于我的开源应用程序(其源代码可以从 此处,如果您想使用功能性 OpenGL ES 2.0 iOS 应用程序).

Finally, as Andy mentions, I taught a class on the subject as part of my course on iTunes U, which you can download for free here. The course notes for that class can be found here or downloaded as a VoodooPad file here. I warn you that I go a little technical quite fast in the OpenGL ES 2.0 session, so you may want to watch the 1.1 session from the previous semester here. I also talk a little bit about what I've done with OpenGL ES 2.0 in this article about my open source application (whose source code can be grabbed from here, if you'd like to play with a functional OpenGL ES 2.0 iOS application).

这篇关于在 iOS 上学习 OpenGLES 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 16:46