Is the source code of kick available somewhere ?
I'm trying to add ipr preview to a Qt C++ App and I would love to have an example of some kind. I can't seem to find reliable pieces of information on the matter.
Definitely not an open source project, but you can use the C++ API to do this. Here's a relevant thread: https://answers.arnoldrenderer.com/questions/7385/interactive-rendering-for-third-pary-plugin.html?c...
Thanks Tim,
not sure why 'definitely' as It could be a great way to see pratical API usage.
Here is what I have for now:
- A custom display driver based on the API example (display driver)
- A Qt app that read ass, and replace existing outputs and driver with the said custom driver attached to a callback.
The callback works, I can see the buffer and data adress but I'm stuck at how to cast it to pixel and send it over a QOpenGL widget or a view of some kind.
You better grasp some basic opengl understanding (instead to aks for proprietary code 🙂 and then lookup Qt to find the couterparts you need there. ie. :
http://www.songho.ca/opengl/gl_fbo.html
http://doc.qt.io/qt-5/qglframebufferobject.html#details
@Max Tarpini Thanks for those links, I'm not familiar with OpenGL for sure, and it seems I can pass the buffer directly to the fbo, i'll investigate.
What I was looking for in my initial question was an example or help in order to access the display driver callback parameters and how to properly "free" them, cast them etc etc... I know the scope is broader than arnold itself but if someone feels like pointing to the right direction that would help :).
The RenderUpdate callback is mostly for handling node updates and status changes, not for doing anything with the display driver. Something like this:
@Stephen Blair I'm using the mechanism to feed a custom callback function.
On the driver parameter:
AiParameterPtr("callback" , NULL );
In my QtApp
AtRenderUpdateCallback cb = AtRenderUpdateCallback(qtIPR); AiNodeSetPtr(qtdriver, "callback", &cb);
The callback