Skip to content

Commit 270e28d

Browse files
committed
flatten opengl examples
1 parent dfa4a30 commit 270e28d

23 files changed

+302
-304
lines changed

OpenGL/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ OpenGL - Examples
44
Program List
55
------------
66

7-
[*Language*](/OpenGL/Language/)
7+
*Language*
88

99
- **motion**.c
1010
- a constantly moving rectangle
1111
- **triangle**.c
1212
- a simple triangle blending colors across each of the points
1313

14-
[*Shaders*](/OpenGL/Shaders/)
14+
*Shaders*
1515

1616
- **shaders**.c
1717
- how to set up a shader in OpenGL (C)
1818
- includes sample shaders: base, gouraud, phong, texture-g, texture-p, & toon
1919

20-
[*System*](/OpenGL/System/)
20+
*System*
2121

2222
- **gui**.c
2323
- a GUI using OpenGL with GLUT and GLUI
2424

25-
[*Tutorials*](/OpenGL/Tutorials/)
25+
*Tutorials*
2626

2727
- **double**.c
2828
- simple square with mouse interactions
@@ -40,14 +40,12 @@ Program List
4040
Compiling & Running Code
4141
------------------------
4242

43-
all programs use C, OpenGL, GLUT, and GLUI
43+
All programs use C, OpenGL, GLUT, and GLUI.
4444

45-
for Linux, you can use the provided bash script
45+
For Linux, you can use the provided bash script:
4646
> e.g. for program: **triangle.c**
4747
48-
> > cd **Language/**
49-
50-
> > ./../run **triangle**
48+
> > ./run **triangle**
5149
5250
for Windows (using Cygwin), you can use the following commands
5351
> gcc -o FILE.exe FILE.c -lgl -lglu -lglut -lopengl32
@@ -63,4 +61,4 @@ for Mac, you can use the following commands
6361
Credit
6462
------
6563

66-
OpenGL Redbook for inspiring all of the *Tutorials/*
64+
OpenGL Redbook for inspiring all of the *Tutorials*.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// base fragment shader (pass-through)
2-
3-
void main(){
4-
gl_FragColor = gl_Color;
5-
}
1+
// base fragment shader (pass-through)
2+
3+
void main(){
4+
gl_FragColor = gl_Color;
5+
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// base vertex shader (pass-through)
2-
3-
void main(){
4-
gl_Position = ftransform();
5-
6-
// can also use:
7-
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
8-
//gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
9-
10-
gl_FrontColor = gl_Color;
11-
}
1+
// base vertex shader (pass-through)
2+
3+
void main(){
4+
gl_Position = ftransform();
5+
6+
// can also use:
7+
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
8+
//gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
9+
10+
gl_FrontColor = gl_Color;
11+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)