diff options
author | Marcel Ribeiro Dantas <ribeirodantasdm@gmail.com> | 2022-12-10 12:08:26 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 12:08:26 -0300 |
commit | 97a2a383c6b2f503ed2febd07bc950d1e95e54bb (patch) | |
tree | cd8fe10053e400fe06009a4dc40cec3b2e5892b6 /opengl.html.markdown | |
parent | 354fe6fe7dd8085b88b0b1a2af2f5e612fe196f2 (diff) | |
parent | bba9f7df211d63293e2a957872d156a0a6dfcd48 (diff) |
Merge pull request #4560 from mribeirodantas/fix-typos-en
Fixes typos in many different English articles
Diffstat (limited to 'opengl.html.markdown')
-rw-r--r-- | opengl.html.markdown | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/opengl.html.markdown b/opengl.html.markdown index 83ace3e8..993402f7 100644 --- a/opengl.html.markdown +++ b/opengl.html.markdown @@ -35,7 +35,7 @@ int main() { context };
window.setVerticalSyncEnabled(true);
window.setActive(true);
- // After that we initialise GLEW and check if an error occured.
+ // After that we initialise GLEW and check if an error occurred.
GLenum error;
glewExperimental = GL_TRUE;
if ((err = glewInit()) != GLEW_OK)
@@ -140,7 +140,7 @@ if (logSize > 0) { }
```
-The same is possibile after <code>glLinkProgram()</code>, just replace <code>glGetShaderiv()</code> with <code>glGetProgramiv()</code>
+The same is possible after <code>glLinkProgram()</code>, just replace <code>glGetShaderiv()</code> with <code>glGetProgramiv()</code>
and <code>glGetShaderInfoLog()</code> with <code>glGetProgramInfoLog()</code>.
```cpp
@@ -194,7 +194,7 @@ void main() { out vec4 outColor;
void main() {
- // We simply set the ouput color to red.
+ // We simply set the output color to red.
// The parameters are red, green, blue and alpha.
outColor = vec4(1.0, 0.0, 0.0, 1.0);
}
@@ -233,7 +233,7 @@ glBufferData(GL_ARRAY_BUFFER, // target buffer // After filling the VBO link it to the location 0 in our vertex shader,
// which holds the vertex position.
// ...
-// To ask for the attibute location, if you haven't set it:
+// To ask for the attribute location, if you haven't set it:
GLint posLocation = glGetAttribLocation(program, "position");
// ..
glEnableVertexAttribArray(0);
@@ -463,7 +463,7 @@ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(iboData[0]) * iboData.size(),
iboData.data(), GL_STATIC_DRAW);
// Next in our render loop, we replace glDrawArrays() with:
-glDrawElements(GL_TRIANGLES, iboData.size(), GL_UNSINGED_INT, nullptr);
+glDrawElements(GL_TRIANGLES, iboData.size(), GL_UNSIGNED_INT, nullptr);
// Remember to delete the allocated memory for the IBO.
```
@@ -535,7 +535,7 @@ glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0, nullptr); // ...
glBindVertexArray(vao);
glBindTexture(GL_TEXTURE_2D, texture);
-glDrawElements(GL_TRIANGLES, iboData.size(), GL_UNSINGED_INT, nullptr);
+glDrawElements(GL_TRIANGLES, iboData.size(), GL_UNSIGNED_INT, nullptr);
// ...
```
@@ -673,7 +673,7 @@ glUniformMatrix4fv(modelLocation, 1, GL_FALSE, ## Geometry Shader
-Gemoetry shaders were introduced in OpenGL 3.2, they can produce vertices
+Geometry shaders were introduced in OpenGL 3.2, they can produce vertices
that are send to the rasterizer. They can also change the primitive type e.g.
they can take a point as an input and output other primitives.
Geometry shaders are inbetween the vertex and the fragment shader.
|