Blender Git Commit Log

Git Commits -> Revision 054d871

Revision 054d871 by Benoit Bolsee (decklink)
December 6, 2015, 11:33 (GMT)
BGE: Add GL synchronization on ImageRender.refresh() without buffer.

Calling ImageRender.refresh() without passing a buffer object will
now perform the render (if not already started earlier with
ImageRender.render()) and wait for the render to complete.
This is done internally with a GLSync object to synchronize with the GPU.
This is only useful when doing offscreen render on texture target:
when refresh() returns, you are guaranteed that the texture is ready for use.

fbo = bge.render.offScreenCreate(width,height,samples,bge.render.RAS_OFS_RENDER_TEXTURE)
tex = fbo.color
ir = bge.texture.ImageRender(scene,camera,fbo)
--> tex is now ready for use

Commit Details:

Full Hash: 054d871ac1604ccd9ef67fdb63e173b9084dc10c
Parent Commit: 803e658
Lines Changed: +320, -17

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2021