简介(Introduction)

Since you came here you probably want to learn the inner workings of computer graphics and do all the stuff the cool kids do by yourself. Doing things by yourself is extremely fun and resourceful and gives you a great understanding of graphics programming. However, there are a few items that need to be taken into consideration before starting your journey.

来到这里你可能是想学习计算机绘图的内部工作原理,并且想自己去做这些酷酷的事情。你自己做这些事情肯定是极为有趣的,而且还会让你对图形编程理解更加深刻。但是在你开始之前还是有一些注意事项需要考虑的。

预备知识(Prerequisites)

Since OpenGL is a graphics API and not a platform of its own, it requires a language to operate in and the language of choice is C++, therefore a decent knowledge of the C++ programming language is required for these tutorials. However, I will try to explain most of the concepts used, including advanced C++ topics where required so it is not required to be an expert in C++, but you should be able to write more than just a 'Hello World' program. If you don't have much experience with C++ I can recommend the following free tutorials at www.learncpp.com.

由于OpenGL本身只是一套绘图API,而并不是一个平台,它需要一门编程语言来操作它,就是C++,因此这个教程需要你有一定的C++编程基础。无论怎样我还是会去解释教程中用到的大部分概念,包括C++的高级主题,学习这些不需要你是C++的专家,但是你至少要能写出比“Hello World”更高级的C++程序。如果你真的没有很多C++经验,我建议你看一下这个免费教程:www.learncpp.com.

Also, we will be using some math (linear algebra, geometry and trigonometry) along the way and I will try to explain all the required concepts of the math required. However, I'm not a mathematician by heart so even though my explanations might be easy to understand, they will most likely be incomplete. So where necessary I will provide pointers to good resources that explain the material in a more complete fashion. Do not be scared about the mathematical knowledge required before starting your journey into OpenGL; almost all the concepts can be understood with a basic mathematical background and I will try to keep the mathematics to a minimum where possible. Most of the functionality does not even require you to understand all the math as long as you know how to use it.

另外,我们还会用到一些数学知识(线性代数,几何和三角函数),我同样还会去解释说明我们用到的这些数学概念。虽然我讲解的这些可能很容易理解,但毕竟我不是数学家,很多知识我讲解的可能不完整。所以在需要的时候我会提供一些更加全面的资源供大家使用。在开始学习OpenGL之前不要害怕这些数学知识;只要有一点数学基础背景,大部分的概念都很容易理解,而且我会尽可能的少用到数学知识。大部分的功能甚至不需要你去理解这些数学知识,只要能用就可以了。

结构(Structure)

LearnOpenGL is broken down into a number of general subjects. Each subject contains several sections that each explain different concepts in large detail. Each of the subjects can be found at the menu to your left. The subjects are taught in a linear fashion (so it is advised to start from the top to the bottom, unless otherwise instructed) where each page explains the background theory and the practical aspects.

LearnOpenGL把知识点分解成了很多普通的章节。每个章节又包含了很多部分去分别详细讲解不同的概念。每个章节都能在你左侧的菜单栏中找到。每个章节都按照线性的方式(所以我建议你从上往下看,除非你学习过)去讲解这些理论和实际应用。

To make the tutorials easier to follow and give them some added structure the site contains boxes, code blocks, color hints and function references.

为了使教程更容易理解,给这些教程添加了一些结构,包括背景框,代码块,颜色指引和函数参考。

  • 背景框(Boxes)

Green boxes encompasses some notes or useful features/hints about OpenGL or the subject at hand.

绿色背景框包含一些注释或者有用的特性/提示OpenGL相关信息或者其它章节里的内容。

Red boxes will contain warnings or other features you have to be extra careful with.

红色背景框将会包含一些警告或者一些你必需特别注意的特性。

  • 代码(Code)

You will find plenty of small pieces of code in the website that are located in dark-gray boxes with syntax-highlighted code as you can see below:
你还会发现带有大量处于深灰色框中带有语法高亮的代码块,像下面这样: Since these provide only snippets of code, wherever necessary I will provide a link to the entire source code required for a given subject. 因此这些仅仅是一些代码片段,在整个章节的最好我会给出全部代码的连接。

  • 颜色提示(Color hints)

Some words are displayed with a different color to make it extra clear these words portray a special meaning:

    • Definition: green words specify a definition i.e. an important aspect/name of something you're likely to hear more often.
    • Program logic: red words specify function names or class names.
    • Variables: blue words specify variables including all OpenGL constants.

有些文字会用不同颜色显示来使它更明显,那么这些内容可能就有特殊的意义了:

    • 定义: 绿色字体是列举一些特殊的定义,例如一些重要的部分/你可能会经常见到的一些命名。
    • 程序逻辑: 红色字体一般是指一些函数名称或者类名。
    • 变量: 蓝色字体是指一些在OpenGL中全局包含的一些变量。
  • (OpenGL Function references)

A particularly well appreciated feature of LearnOpenGL is the ability to review most of OpenGL's functions wherever they show up in the content. Whenever a function is found in the content that is documented at the website, the function will show up with a slightly noticeable underline. You can hover the mouse over the function and after a small interval, a pop-up window will show relevant information about this function including a nice overview of what the function actually does. Hover your mouse over glEnable to see it in action.

在LearnOpenGL中我们尽可能的在正文中展示和回顾OpenGL中大部分有用和特殊的函数。但是当你在正文中发现一些函数出现时,函数下面会有高亮提示的下划线。你可以用鼠标悬停在上方一会儿,这个函数的详细使用信息就会展示在一个弹出窗口中。现在你可以将鼠标悬停到glEnable上来看看效果。

Now that you got a bit of a feel of the structure of the site, hop over to the Getting Started section to start your journey in OpenGL!

现在你应该对这里的结构有些了解了,调到现在开始部分去开始你的OpenGL之旅吧!

results matching ""

    No results matching ""