在iOS上学习OpenGLES 2.0 [英] Learning OpenGLES 2.0 on iOS

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

问题描述

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




  • OpenGL®ES2.0编程指南

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



但是阅读亚马逊的评论我看到他们要么承担以前的OpenGL知识,要么不是专门为iOS版。 (我知道OpenGL应该很容易移植,但是我正在寻找一本带有C语言的书籍/资源,而不是C ++,它讨论iOS环境中的OpenGL)



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



任何帮助都将不胜感激!

解决方案

找到适用于iOS(或任何操作系统,实际上)的OpenGL ES 2.0材料要比过去大约一年前容易得多。



对于从纯iOS角度编写的内容,很难从他未发表的书中击败Jeff LaMarche的章节,该书从这里。你链接到他的OpenGL ES 1.1教程,这也很棒,但是他没有把他的新2.0材料放在那个列表上。



iPhone 3D编程是一本很棒的书,涵盖了OpenGL ES 1.1和2.0。它并不假设您了解OpenGL ES,并且他确实解释了理解他所谈论的内容所需的数学和其他基础知识。他最终融入了一些非常先进的技术。但是,他的所有代码都是用C ++编写的,而不是Objective-C,因此对于习惯Cocoa开发的人来说可能有点令人不安。尽管如此,OpenGL ES的核心C API是相同的,所以很容易看出发生了什么。



如果你正在寻找特定的效果, OpenGL着色语言书籍仍然是您可以参考的主要资源之一。在为桌面OpenGL编写时,大多数着色语言和着色器直接转换为OpenGL ES 2.0,只需要稍加修改。



书籍 ShaderX6 ShaderX7 GPU Pro ,和 GPU Pro 2 也有专门介绍OpenGL ES 2.0的部分,它们提供了一些渲染和调整你在其他地方找不到的提示。然而,这些是更先进(和昂贵)的书籍。



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



最后,正如Andy所提到的,我在iTunes U课程中教授了一门关于这门课程的课程,你可以免费下载< a href =http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=407243028 =nofollow noreferrer>这里。该课程的课程说明可以在这里找到或下载作为VoodooPad文件此处。我警告你,我在OpenGL ES 2.0会话中的技术速度相当快,所以你可能想要观看上一学期的1.1会话这里。我还谈了一下我在这篇文章关于我的开源应用程序(其源代码可以从获取)这里,如果您想使用功能强大的OpenGL ES 2.0 iOS应用程序。)


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 Programming Guide
  • iPhone 3D Programming: Developing Graphical Applications with OpenGL ES

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)

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.

Any help would be appreciated!

解决方案

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.

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 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.

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.

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.

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.

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆