Need exammple of vieport render code

Is there any example of new vieport rendering, so I can understand how to make it work for Mitsuba? On blender wiki there is note that ‘vieport render’ needs function

def view_draw(self, context)

So I added it, but nothing hapenns, not errors that would point me to where problem is. How do I output render from mitsuba to vieport or anything.

The nearest to a example code I have been able to find is the IBL AddOn that bashi mentions in this thread.
The IBL Toolkit Beta:
Download (import as addon):…

I think you need to use OpenGL to draw the pixels. Using glDrawPixels or a textured quad.