开发者

create cairo context without a present window object

开发者 https://www.devze.com 2023-01-15 01:31 出处:网络
I am currently using libcairomm for graphic stuff in my program. All the internet examples use code like

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消