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)
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/RenderEngineAPI

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): http://www.dalaifelinto.com/ftp/impa…olkit_beta.zip

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