Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more pleasant colours #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions 04perspective.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,40 +160,40 @@ int main() {
GLfloat vertexData[] = {
// X Y Z R G B
// face 0:
1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 0
-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 1
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 2
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 0
-1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 1
1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 2
-1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 3

// face 1:
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 1
1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 2
1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 0
1.0f,-1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 1
1.0f, 1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 2
1.0f,-1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 3

// face 2:
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 0
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 0
1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 3

// face 3:
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 1
-1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 0
1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 1
-1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 3

// face 4:
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 3
-1.0f, 1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 3

// face 5:
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 0
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 1
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 3
1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 0
-1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 1
1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 3
}; // 6 faces with 4 vertices with 6 components (floats)

// fill with data
Expand Down
50 changes: 25 additions & 25 deletions 05fbo_fxaa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,40 +163,40 @@ int main() {
GLfloat vertexData[] = {
// X Y Z R G B
// face 0:
1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 0
-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 1
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 2
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 0
-1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 1
1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 2
-1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 3

// face 1:
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 1
1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 2
1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 0
1.0f,-1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 1
1.0f, 1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 2
1.0f,-1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 3

// face 2:
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 0
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 3

1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 0
1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 3
// face 3:
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 1
-1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 0
1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 1
-1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 3

// face 4:
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 3
-1.0f, 1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 3

// face 5:
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 0
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 1
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 3
1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 0
-1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 1
1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 3
}; // 6 faces with 4 vertices with 6 components (floats)

// fill with data
Expand Down
56 changes: 28 additions & 28 deletions 06instancing1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,40 +161,40 @@ int main() {
GLfloat vertexData[] = {
// X Y Z R G B
// face 0:
1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 0
-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 1
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 2
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 0
-1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 1
1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 2
-1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 3

// face 1:
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 1
1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 2
1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 0
1.0f,-1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 1
1.0f, 1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 2
1.0f,-1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 3

// face 2:
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 0
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 0
1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 3

// face 3:
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 1
-1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 0
1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 1
-1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 3

// face 4:
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 3
-1.0f, 1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 3

// face 5:
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 0
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 1
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 3
1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 0
-1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 1
1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 3
}; // 6 faces with 4 vertices with 6 components (floats)

// fill with data
Expand Down
56 changes: 28 additions & 28 deletions 06instancing2_buffer_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,40 +167,40 @@ int main() {
GLfloat vertexData[] = {
// X Y Z R G B
// face 0:
1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 0
-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 1
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 2
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 0
-1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 1
1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 2
-1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 3

// face 1:
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 1
1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 2
1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 0
1.0f,-1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 1
1.0f, 1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 2
1.0f,-1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 3

// face 2:
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 0
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 0
1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 3

// face 3:
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 1
-1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 0
1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 1
-1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 3

// face 4:
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 3
-1.0f, 1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 3

// face 5:
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 0
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 1
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 3
1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 0
-1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 1
1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 3
}; // 6 faces with 4 vertices with 6 components (floats)

// fill with data
Expand Down
48 changes: 24 additions & 24 deletions 06instancing3_uniform_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,40 +186,40 @@ int main() {
GLfloat vertexData[] = {
// X Y Z R G B
// face 0:
1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 0
-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 1
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 2
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 0
-1.0f, 1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 1
1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 2
-1.0f,-1.0f, 1.0f, 0.067f, 0.455f, 0.729f, // vertex 3

// face 1:
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, // vertex 1
1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 2
1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 0
1.0f,-1.0f, 1.0f, 0.843f, 0.329f, 0.149f, // vertex 1
1.0f, 1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 2
1.0f,-1.0f,-1.0f, 0.843f, 0.329f, 0.149f, // vertex 3

// face 2:
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 0
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, // vertex 3
1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 0
1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 1
-1.0f, 1.0f, 1.0f, 0.925f, 0.69f, 0.208f, // vertex 2
-1.0f, 1.0f,-1.0f, 0.925f, 0.69f, 0.208f, // vertex 3

// face 3:
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 0
1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 1
-1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, // vertex 3
1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 0
1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 1
-1.0f, 1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.49f, 0.2f, 0.549f, // vertex 3

// face 4:
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.0f, 1.0f, 1.0f, // vertex 3
-1.0f, 1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 0
-1.0f, 1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 1
-1.0f,-1.0f, 1.0f, 0.471f, 0.671f, 0.227f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.471f, 0.671f, 0.227f, // vertex 3

// face 5:
1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 0
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, // vertex 1
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 2
-1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, // vertex 3
1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 0
-1.0f,-1.0f, 1.0f, 0.325f, 0.749f, 0.925f, // vertex 1
1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 2
-1.0f,-1.0f,-1.0f, 0.325f, 0.749f, 0.925f, // vertex 3
}; // 6 faces with 4 vertices with 6 components (floats)

// fill with data
Expand Down
2 changes: 1 addition & 1 deletion 07geometry_shader_blending.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int main() {
"layout(location = 0) out vec4 FragColor;\n"
"void main() {\n"
" float s = 0.2*(1/(1+15.*dot(txcoord, txcoord))-1/16.);\n"
" FragColor = s*vec4(1,0.9,0.6,1);\n"
" FragColor = s*vec4(0.925f, 0.69f, 0.208f, 1.0f);\n"
"}\n";

// program and shader handles
Expand Down
2 changes: 1 addition & 1 deletion 08map_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int main() {
"layout(location = 0) out vec4 FragColor;\n"
"void main() {\n"
" float s = 0.2*(1/(1+15.*dot(txcoord, txcoord))-1/16.);\n"
" FragColor = s*vec4(0.3,0.3,1.0,1);\n"
" FragColor = s*vec4(0.067f, 0.455f, 0.729f, 1.0f);\n"
"}\n";

// program and shader handles
Expand Down
2 changes: 1 addition & 1 deletion 09transform_feedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int main() {
"layout(location = 0) out vec4 FragColor;\n"
"void main() {\n"
" float s = 0.2*(1/(1+15.*dot(txcoord, txcoord))-1/16.);\n"
" FragColor = s*vec4(0.3,0.3,1.0,1);\n"
" FragColor = s*vec4(0.325f, 0.749f, 0.925f, 1.0f);\n"
"}\n";

// program and shader handles
Expand Down