[Bf-cycles] Render to memory buffer
Guillaume Chéreau
guillaume.chereau at gmail.com
Sun Mar 18 15:13:26 CET 2018
> On Sun, Mar 18, 2018 at 2:08 PM, Brecht Van Lommel
> <brechtvanlommel at pandora.be> wrote:
>> Something
>> like this:
>>
>> thread_scoped_lock display_lock(session->display_mutex);
>> if(session->display->draw_ready()) {
>> uint width = session->display->draw_width;
>> uint height = session->display->draw_height;
>> uchar4 *pixels = session->display->rgba_byte.data();
>> ... do something ...
>> }
OK! Somehow I thought this wasn't correct since display_mutex is
marked as protected, which made me assume that it was important to
actually call session->draw.
This is much simpler indeed, thanks.
- gui
More information about the Bf-cycles
mailing list