学习 OpenGL,学习现代 OpenGL 的综合教程资源。
Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

原始链接: https://learnopengl.com/

《LearnOpenGL》是一项全面且免费的资源,旨在教授现代(核心配置)OpenGL。它通过提供适合初学者及资深开发者的清晰分步指南,解决了图形编程教程陈旧或不完整这一常见痛点。 课程内容涵盖了基础图形概念与实用技术,包括光照、3D建模、后期处理和场景管理。学习内容最终以游戏开发实战演示作为总结,使读者能够将所学技能应用于实际项目。 该内容可通过在线阅读、下载PDF或购买专业印刷版获取。无论你是为了学术、职业还是个人兴趣而学习,本书都提供了一条掌握现代OpenGL的结构化路径。若要开启学习之旅,只需从网站的引言部分开始即可。

关于《Learn OpenGL》的 Hacker News 讨论凸显了计算机图形学教育中的核心争论:概念易懂性与行业标准复杂性之间的权衡。 支持者认为,《Learn OpenGL》依然是初学者的“圣经”,因为它专注于光照、PBR(基于物理的渲染)和坐标系等基础概念,而不会像 Vulkan 或 DX12 等现代 API 那样需要极其繁琐的底层样板代码。他们认为这些“现代”API 往往过度工程化,对于试图掌握渲染管线基础知识的人来说,学习体验并不理想。 相反,批评者认为 OpenGL 在功能上已经过时,在 macOS 等平台上已被弃用,且其基于状态机的混乱设计会培养出“坏习惯”。一些人建议使用 WebGPU 等替代方案,因其具备跨平台实用性和现代化的设计,或者建议完全绕过 API,通过从零编写软件渲染器来学习。 归根结底,目前的共识是,尽管 OpenGL 不再是现代生产环境中的行业标准技能,但它依然是一种极其有效的教学工具。大多数开发者认为,一旦掌握了基本原理,再迁移到更复杂、性能更高的 API,要比从零开始学习它们平滑得多。
相关文章

原文

Welcome to the online book for learning OpenGL! Whether you are trying to learn OpenGL for academic purposes, to pursue a career or simply looking for a hobby, this book will teach you the basics, the intermediate, and all the advanced knowledge using modern (core-profile) OpenGL. The aim of LearnOpenGL is to show you all there is to modern OpenGL in an easy-to-understand fashion with clear examples, while also providing a useful reference for later studies.

So why read these chapters?

Throughout the internet there are thousands of documents, books, and resources on learning OpenGL, however, most of these resources are only focused on OpenGL's immediate mode (commonly referred to as the old OpenGL), are incomplete, lack proper documentation, or are not suited for your learning preferences. Therefore, my aim is to provide a platform that is both complete and easy to understand.
Image of smiling textured containers in OpenGL

If you enjoy reading content that provides step-by-step instructions, clear examples, and that won't throw you in the deep with millions of details, this book is probably for you. The chapters aim to be understandable for people without any graphics programming experience, but are still interesting to read for the more experienced users. We also discuss practical concepts that, with some added creativity, could turn your ideas into real 3D applications. If all of the previous sounds like someone that could be you, then by all means, please continue.

What will you learn?

The focus of these chapters are on Modern OpenGL. Learning (and using) modern OpenGL requires a strong knowledge of graphics programming and how OpenGL operates under the hood to really get the best of your experience. So we will start by discussing core graphics aspects, how OpenGL actually draws pixels to your screen, and how we can leverage that knowledge to create some funky looking effects.

On top of the core knowledge we will discuss many useful techniques that you can use for your applications, like: traversing a scene, create beautiful lighting, load custom-made objects from a modelling program, do cool post-processing techniques, and much more. We also feature a walkthrough series where we actually create a small game based on our obtained OpenGL knowledge, so you will really get a feel of what it's like to actually do graphics programming.

Where to start

Learn OpenGL is free, and will always be free, for anyone who wants to start with graphics programming. All content is available here at the menu to your left. Simply hit the Introduction button and you're ready to start your journey!


Learn OpenGL - print edition

Image of physical front cover

The content has been thoroughly revised, numerous times, over the course of 7 years to have finally been aggregated into a physical copy available for print. There's been a lot of work put into the physical copy, treating it as the first-class citizen it is. Both the book and website are equals, their content is the same.

As everything is freely available online, getting the physical copy supports me as an author; and let's not forget that certain charm of printed paper. The book is available for sale on Amazon US, Amazon UK, Barnes & Noble, and many other (online) retailers. Note that at some retailers the book is ridiculously overpriced; make sure it matches roughly $60 US dollars, or wait a bit untill the prices balance themselves out.


Learn OpenGL - online print edition - Free PDF

Image of book in PDF format

I've revised the source files for the physical print edition and cleaned them up to be available for online reading as well, for those that prefer its content in a singular PDF format. Use this format if you'd like to read during travel, write notes, or print it out yourself. In similar style to the website, this version is, and will always be, freely available.

Note that, similar to the physical copy, links/urls are written out fully or as footnotes, videos show static images, and there's no function hover pop-ups; all to account for the content being mostly offline.


If you want to keep up to date on the site and book's progress and/or other LearnOpenGL news, please follow me on Twitter.

联系我们 contact @ memedata.com