[cairo] trouble with Cairo text in OpenGL
nadaeck at hotmail.com
Thu Jan 5 04:54:48 PST 2012
Well thanks to your help, it works now!
> Kind of, he needs to flush the drawing operations with cairo_surface_flush().
Indeed a proper call to 'cairo_surface_flush(surface)' before calling 'cairo_image_surface_get_data (surface)' ws necessary
> You're trying to draw a very big text string on a very small image.
> I would suggest you to start using a big destination and a default font.
I had to adjust a bit but this was quite ok
> Saving to png can help you check if the image content is what you need it to be.
> For this kind of debugging purposes, cairo provides cairo_surface_write_to_png()
This was not necessary hopefully
> This is basically the same as (the cairo part of) your code, except
> that it starts the text from (0,48), making it visible.
> (If you define FIXED to 0, you get a completely transparent image).
Yes I had to call cairo_move_to() to have the text at the right place;
> If you manage to get the png right, making cairo and GL interact as
> desired should only be a matter of choosing the correct pixel format.
Many stuff have already been said yesterday; thank you to all of you who helped me so kindly
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo