1
0
Fork 0

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)
This commit is contained in:
Neil Roberts 2013-04-19 17:55:29 +01:00
parent 856e9aa5f4
commit 08b0d2d63e
8 changed files with 8 additions and 8 deletions

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};

View file

@ -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}
};