Hello everyone,

First sorry for my bad English. I drow with Cairo un a texture Cogl, I
test as well but it does not:

  #define WIDTH 300
  #define HEIGHT 600
  #define STRIDE (WIDTH * 4)

  /* cairo surface */
  unsigned char image[STRIDE*HEIGHT];
  cairo_surface_t *surface;
  cairo_t *cr;

  surface = cairo_image_surface_create_for_data (
    image,
    CAIRO_FORMAT_ARGB32, WIDTH, HEIGHT, STRIDE
  );
  cr = cairo_create (surface);

  cairo_rectangle (cr, 0, 0, WIDTH, HEIGHT);
  cairo_set_source_rgb (cr, 1, 0, 1);
  cairo_fill (cr);

  /* cogl texture */
  priv->texture = cogl_texture_new_from_data (
    WIDTH,
    HEIGHT,
    32,
    FALSE, 
    COGL_PIXEL_FORMAT_32,
    COGL_PIXEL_FORMAT_ANY,
    WIDTH*2,
    surface
  );


thank you for your help
Vincent


-- 
To unsubscribe send a mail to [email protected]

Reply via email to