diff --git a/04perspective.cpp b/04perspective.cpp index e9d212d..5f8ffe4 100644 --- a/04perspective.cpp +++ b/04perspective.cpp @@ -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 diff --git a/05fbo_fxaa.cpp b/05fbo_fxaa.cpp index f90b478..5a31af2 100644 --- a/05fbo_fxaa.cpp +++ b/05fbo_fxaa.cpp @@ -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 diff --git a/06instancing1.cpp b/06instancing1.cpp index dfdc357..3db86d2 100644 --- a/06instancing1.cpp +++ b/06instancing1.cpp @@ -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 diff --git a/06instancing2_buffer_texture.cpp b/06instancing2_buffer_texture.cpp index 7b8f0c4..7d676cb 100644 --- a/06instancing2_buffer_texture.cpp +++ b/06instancing2_buffer_texture.cpp @@ -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 diff --git a/06instancing3_uniform_buffer.cpp b/06instancing3_uniform_buffer.cpp index 99a9ab9..060c55c 100644 --- a/06instancing3_uniform_buffer.cpp +++ b/06instancing3_uniform_buffer.cpp @@ -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 diff --git a/07geometry_shader_blending.cpp b/07geometry_shader_blending.cpp index acb3962..950259e 100644 --- a/07geometry_shader_blending.cpp +++ b/07geometry_shader_blending.cpp @@ -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 diff --git a/08map_buffer.cpp b/08map_buffer.cpp index 56e0036..74a0e99 100644 --- a/08map_buffer.cpp +++ b/08map_buffer.cpp @@ -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 diff --git a/09transform_feedback.cpp b/09transform_feedback.cpp index fa191be..f29e419 100644 --- a/09transform_feedback.cpp +++ b/09transform_feedback.cpp @@ -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