summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-04-19 17:55:29 +0100
committerNeil Roberts <neil@linux.intel.com>2013-04-22 13:01:45 +0100
commit08b0d2d63ed400955b865ad4a205d2fff74e6cc6 (patch)
treea4dcb6f1b23b690c3a994ef314508ccb80a4e39d /examples
parent856e9aa5f4bd89284705de50665c0aa323966af3 (diff)
downloadcogl-08b0d2d63ed400955b865ad4a205d2fff74e6cc6.tar.gz
examples: Fix the first colour in the triangle_vertices
The first vertex in the triangle vertices used in the cogl-hello example (which were copied into a few other examples) for some reason has a semi-transparent alpha component. However the colour needs to be pre-multiplied and the red component was still 0xff so the colour is effectively invalid and the transparency isn't shown. This patch just sets the alpha component to 0xff to make it less confusing. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 461879986ec012556b4e680b73e36d440927faaa)
Diffstat (limited to 'examples')
-rw-r--r--examples/android/hello/jni/main.c2
-rw-r--r--examples/cogl-gles2-context.c2
-rw-r--r--examples/cogl-hello.c2
-rw-r--r--examples/cogl-msaa.c2
-rw-r--r--examples/cogl-sdl-hello.c2
-rw-r--r--examples/cogl-sdl2-hello.c2
-rw-r--r--examples/cogl-x11-foreign.c2
-rw-r--r--examples/cogland.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/examples/android/hello/jni/main.c b/examples/android/hello/jni/main.c
index 2c5bd9b4..c9a84018 100644
--- a/examples/android/hello/jni/main.c
+++ b/examples/android/hello/jni/main.c
@@ -42,7 +42,7 @@ static int test_init (TestData* data)
CoglOnscreen *onscreen;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-gles2-context.c b/examples/cogl-gles2-context.c
index 1cf375fa..de66c211 100644
--- a/examples/cogl-gles2-context.c
+++ b/examples/cogl-gles2-context.c
@@ -70,7 +70,7 @@ main (int argc, char **argv)
CoglOnscreen *onscreen;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-hello.c b/examples/cogl-hello.c
index 5bda9bf7..3ba1e31c 100644
--- a/examples/cogl-hello.c
+++ b/examples/cogl-hello.c
@@ -39,7 +39,7 @@ main (int argc, char **argv)
CoglOnscreen *onscreen;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-msaa.c b/examples/cogl-msaa.c
index 73f9c4e2..4a388bc7 100644
--- a/examples/cogl-msaa.c
+++ b/examples/cogl-msaa.c
@@ -12,7 +12,7 @@ main (int argc, char **argv)
CoglFramebuffer *fb;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-sdl-hello.c b/examples/cogl-sdl-hello.c
index 961137ae..acb9125a 100644
--- a/examples/cogl-sdl-hello.c
+++ b/examples/cogl-sdl-hello.c
@@ -80,7 +80,7 @@ main (int argc, char **argv)
CoglOnscreen *onscreen;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-sdl2-hello.c b/examples/cogl-sdl2-hello.c
index 405cb92d..12e6ced2 100644
--- a/examples/cogl-sdl2-hello.c
+++ b/examples/cogl-sdl2-hello.c
@@ -89,7 +89,7 @@ main (int argc, char **argv)
CoglOnscreen *onscreen;
CoglError *error = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogl-x11-foreign.c b/examples/cogl-x11-foreign.c
index ca9e3ed7..a60397cd 100644
--- a/examples/cogl-x11-foreign.c
+++ b/examples/cogl-x11-foreign.c
@@ -61,7 +61,7 @@ main (int argc, char **argv)
unsigned long mask;
Window xwin;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};
diff --git a/examples/cogland.c b/examples/cogland.c
index ab4f3c18..7a027197 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -1056,7 +1056,7 @@ main (int argc, char **argv)
CoglError *error = NULL;
GError *gerror = NULL;
CoglVertexP2C4 triangle_vertices[] = {
- {0, 0.7, 0xff, 0x00, 0x00, 0x80},
+ {0, 0.7, 0xff, 0x00, 0x00, 0xff},
{-0.7, -0.7, 0x00, 0xff, 0x00, 0xff},
{0.7, -0.7, 0x00, 0x00, 0xff, 0xff}
};