5
#include "test-utils.h"
10
CoglPipeline *pipeline = cogl_pipeline_new (test_ctx);
11
int width = cogl_framebuffer_get_width (test_fb);
12
int half_width = width / 2;
13
int height = cogl_framebuffer_get_height (test_fb);
14
CoglVertexP2 tri0_vertices[] = {
17
{ half_width, height },
19
CoglVertexP2C4 tri1_vertices[] = {
20
{ half_width, 0, 0x80, 0x80, 0x80, 0x80 },
21
{ half_width, height, 0x80, 0x80, 0x80, 0x80 },
22
{ width, height, 0x80, 0x80, 0x80, 0x80 },
27
cogl_framebuffer_clear4f (test_fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0);
29
tri0 = cogl_primitive_new_p2 (test_ctx, COGL_VERTICES_MODE_TRIANGLES,
31
tri1 = cogl_primitive_new_p2c4 (test_ctx, COGL_VERTICES_MODE_TRIANGLES,
34
/* Check that cogl correctly handles the case where we draw
35
* different primitives same pipeline and switch from using the
36
* opaque color associated with the pipeline and using a colour
37
* attribute with an alpha component which implies blending is
40
* If Cogl gets this wrong then then in all likelyhood the second
41
* primitive will be drawn with blending still disabled.
44
cogl_primitive_draw (tri0, test_fb, pipeline);
45
cogl_primitive_draw (tri1, test_fb, pipeline);
47
test_utils_check_pixel_and_alpha (test_fb,
56
cogl_framebuffer_orthographic (test_fb, 0, 0,
57
cogl_framebuffer_get_width (test_fb),
58
cogl_framebuffer_get_height (test_fb),