[cairo] cairo with open GL backend

guhan senthilkumar guhan.senthilkumar at gmail.com
Tue Nov 23 23:03:04 PST 2010


Hey,

Thanks a lot for giving me the example gears program..
It compiled without any problem.Infact i was able to run with the x-render
option without any problems. But when i tried to give a.out -gl along with
any TEST option( i gave GRAD) i am getting the error,

"error constructing surface: the surface type is not appropriate for the
operation."

Any ideas on this???

Thanks,
Guhan

On Sun, Nov 21, 2010 at 3:48 PM, Uli Schlachter <psychon at znc.in> wrote:

> Am 21.11.2010 00:09, Steve Harrington wrote:
> > On 11/20/2010 02:20 PM, Luca Barbato wrote:
> >> On 11/19/2010 01:54 PM, guhan senthilkumar wrote:
> >>
> >>> Oh like that. Ok Ok.. :)
> >>> I have driver support for my GPU..
> >>>
> >>> Do you have a working example with openGL backed.??
> >>> Or just please help me get started with writing the most simplest of
> >>> applications with cairo and openGL backend. :) :)
> >>>
> >> http://cgit.freedesktop.org/~anholt/cairogears<http://cgit.freedesktop.org/%7Eanholt/cairogears>might help.
> >>
> >> lu
> >>
> >>
> > Helps a lot. Looking at the boilerplate I thought I must have been
> > mistaken to see so many raw Xlib calls but it seems that is the way this
> > backend is designed to be used.
> >
> > I do have one problem with cairogears however.  I get an error
> > (cairogears.c line 364) when I run the program:
> >
> > LD_LIBRARY_PATH=$PREFIX/lib ./cairogears -gl GRAD
> > error constructing context: the surface type is not appropriate for the
> > operation
> >
> > although the gears window is drawn but not updated if I comment out the
> > exit(1) on line 367.  If this is something obvious please let me know.
> > If not I'll probably run into it again as I adapt this code for my own
> use.
>
> I took a look at this. The cairo_gl_surface_set_size call on line 369
> causes a
> CAIRO_STATUS_SURFACE_TYPE_MISMATCH. Anyone got any idea why? Just
> commenting
> that line out makes it work (as long as you don't resize the window).
>
> Also, just for the fun of it, I added support for cairo's xcb backend (Ugly
> patch attached). It's ugly, but I wanted to see if there was some
> difference in
> speed between xcb and xlib. There isnt, but both are faster than gl here.
>
> Cheers,
> Uli
> --
> Q: Because it reverses the logical flow of conversation.
> A: Why is putting a reply at the top of the message frowned upon?
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20101124/99712099/attachment.htm>


More information about the cairo mailing list