Replies: 7 comments 5 replies
-
@dtromb Hello, we have no official examples. Have you tried this? https://manpages.debian.org/experimental/libsdl3-image-doc/IMG_Load_RW.3.en.html. I believe the main idea is sharing the ThorVG canvas target buffer with SDL image. I expect it's technically possible. |
Beta Was this translation helpful? Give feedback.
-
Well, What I'm trying is creating an However, when I call I'm at a loss. Is TVG trying to read/write beyond that logical raster on set_target for some reason? Are there any examples at all of direct use of a SWCanvas target that I could look at? I've started trying to read the source, but I'm still not sure what's going wrong.... |
Beta Was this translation helpful? Give feedback.
-
TY, this is a very helpful example! This (and my original code!) both work on Linux but fail with segfault on Windows - previously I was only building on Windows. I'll try to more preceisely track it down, I guess. |
Beta Was this translation helpful? Give feedback.
-
Running Dr. Memory shows:
(the line number is off because i added a breadcrumb cout << on the line before, which is passed fine and prints to cout) This is probably some kind of subtle compilation issue - but I'm just running meson setup / compile.... |
Beta Was this translation helpful? Give feedback.
-
Ok, I still have no idea what the problem is but my workaround is compiling everything 32-bit, and it works just fine on both platforms. Will comment here if I ever find out more, but I strongly doubt this was thorvg-related. Thanks all for your time! |
Beta Was this translation helpful? Give feedback.
-
@mgrudzinska I just compiled a static thorvg lib (Debian 12 Linux) and it runs with a simple command line 👌
./App [L] RENDERER (../thorvg-git/src/renderer/tvgCanvas.cpp 60): Draw S. -------------------------------- Canvas(0x562396d2d540) |
Beta Was this translation helpful? Give feedback.
-
Crazy you can compare both APIs ;) tvg::Initializer::init(4, tvg::CanvasEngine::Sw);
//tvg_engine_init(TVG_ENGINE_SW, 4); |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if it is possible to use thorvg to render directly onto an SDL_Surface (not an SDL_Texture / OpenGL window!)
Can anyone point me in the right direction, if this is an option? Are there examples?
Beta Was this translation helpful? Give feedback.
All reactions