blend2d / blend2d

2D Vector Graphics Engine Powered by a JIT Compiler

Home Page:https://blend2d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to do offscreen rendering in qt?

evehal opened this issue · comments

Blend2D always renders to pixel buffers, thus it's always offscreen.

You either let Blend2D allocate that buffer by creating a BLImage or you have your own and use BLImage::createFromData() - see https://blend2d.com/doc for a reference documentation.

BTW you can also wrap QImage in a BLImage and render to it, etc... This is done by Blend2D demos that compare Blend2D and Qt rendering.

Thank you kobalicek
Im developing a real time mixing(A/B textures) application like vMix
I guess I can use blend2d instead of qt qpainter for drawing titles, 2d fx, images ...
So how to get fbo or offscreen texture id(opengl)

Blend2D is a software renderer only at the moment, so if you need software rendering then it's a good choice, however, if you already have data on GPU side I'm not sure it's a good idea as you would need a GPU renderer instead.

Blend2D doesn't talk to OpenGL or other 3D APIs - it renders only to a pixel buffer target. It's up to you whether you let Blend2D allocate them (via BLImage) or you supply your own data to render into.

Thank you kobalicek