Skip to main content
MikoDust
Inspiring
February 23, 2016
Answered

Does anyone successful connection SDK with Cairo? (2D Drawing)

  • February 23, 2016
  • 1 reply
  • 680 views

Hey, guys!

I create plugin with SDK and OpenGL, but my tasks is modest with 2D graphics. OpenGL is too huge for this.

In case with OpenGL I can use this scheme:

1. Create framebuffer object

2. Create OGL Context

3. Set OGL Context in Render macros

4. Draw with OGL

5. Copy data from framebuffer object to world (with memcpy)

6. Destroy framebuffer and switch to AE context


But in case with Cairo I can't use similar scheme. Or don't know how to do it right. Because with Cairo I don't know method like sizeof(GL_RGBA) to do right buffer calculations with memcpy.

How can I create connection with Adobe SDK and Cairo (cairographics.org‌)? Or maybe anyone has solved similar tasks with connection another graphics library?


Thank you!

With warm,

Mike.

This topic has been closed for replies.
Correct answer shachar carmi

to the best of my knowledge you'll need to draw onto a native cairo buffer,

and when you're done, convert it pixel by pixel into an AE buffer.

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
February 23, 2016

to the best of my knowledge you'll need to draw onto a native cairo buffer,

and when you're done, convert it pixel by pixel into an AE buffer.

MikoDust
MikoDustAuthor
Inspiring
February 23, 2016

Thank you, Shachar carmi! I'll try.

With warm,

Mike.