I am currently using libcairomm for graphic stuff in my program.
All the internet examples use code like
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
But I am using cai开发者_开发知识库ro to pass a svg texture to OpenGL Is there a kind of constructor working without that window ?
Thank you for the answers :)
I dont't understand quite. The cairomm docs have working examples which show how to create all kinds of of non-windowed surfaces:
http://cairographics.org/documentation/cairomm/reference/examples.html
You can also allocate your own memory and pass it to create an image surface:
http://cairographics.org/documentation/cairomm/reference/classCairo_1_1ImageSurface.html#feb1b8203f9fa23ff4bca7b70723f370
This might be helpful if you want to prepare some texture for OpenGL.
精彩评论