1414/*
1515Welcome to the first tutorial on OpenGL. OpenGL is an API for programming 3D, and is
1616used to develop applications from games to medical visualizations. This tutorial shows
17- you how to setup a basics OpenGL application and draw a triangle in 3D space. This is the
17+ you how to setup a basic OpenGL application and draw a triangle in 3D space. This is the
1818first of the updated OpenGL tutorials that replaces the old OpenGL 2.0 tutorials with the
1919newer OpenGL 4.0. You will need to make sure you have the latest drivers to run this
2020tutorial, which links can be found here: https://www.opengl.org/wiki/Getting_Started.
@@ -131,7 +131,7 @@ matrix is created by calculating the inverse of a camera matrix. , which stores
131131and up vector. A camera is described as a pinhole where it is a single point (the location
132132of the camera).
133133
134- Projection Matrix-
134+ - Projection Matrix-
135135Next, the Vertex is multiplied by a Projection matrix to produce the Clipping Coordinates. A Projection matrix
136136is created by a field of view (FOV) and near and far planes. A field of view is usually between 60-120 degrees
137137The FOV and near/far planes create what is called a frustum that determines what the camera can see. Think of
@@ -180,7 +180,7 @@ if you are trying to make a cross-platform renderer like the Unreal Engine.
180180-Shaders-
181181If you haven't ever worked with shaders, let's go over a brief overview of what they are and what they can do,
182182and then later you will want to check out the "Shaders\" folder to get a line-by-line instruction on each shader.
183- There are multiple types of shaders such as vertex shaders, fragment shaders (pixel shader), geometry, tesselation
183+ There are multiple types of shaders such as vertex shaders, fragment shaders (pixel shader), geometry, tessellation
184184and compute (CUDA) shaders. In this tutorial we will just be going over the base shaders which are the vertex
185185and framework shaders. Shaders allow us to run programming instructions directly on the GPU of your video card
186186which is optimized to process math, physics and rendering instructions incredibly fast. You pass in shaders as
@@ -195,8 +195,8 @@ variables to the fragment shader like color, texture coord and normal data for t
195195it's per-pixel operations.
196196
197197A fragment shader handles the per-pixel operations and allows you to run calculations for every pixel on the
198- screen. This sets the final RGBA color for a pixel, and is used extensively to calcualte lighting and shadows.
199- One of the most popular uses for a frament shader is to calculate beautiful lighting, especially when used with
198+ screen. This sets the final RGBA color for a pixel, and is used extensively to calculate lighting and shadows.
199+ One of the most popular uses for a fragment shader is to calculate beautiful lighting, especially when used with
200200a normal map, which will be explained in our Normal Mapping tutorial. In a framework shader you give an output
201201variable that is the final RGBA value. This is then passed to the OpenGL pipeline to process. In this tutorial
202202we won't be passing in any color but hard coding the triangle to white. The next tutorial will pass in colors.
0 commit comments