mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
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:
parent
856e9aa5f4
commit
08b0d2d63e
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
@ -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}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user