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)
ir.refresh()
--> tex is now ready for use

Commit Details:

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

3 Added Paths:

/source/gameengine/Rasterizer/RAS_ISync.h (+48, -0) (View)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLSync.cpp (+88, -0) (View)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLSync.h (+44, -0) (View)

12 Modified Paths:

/doc/python_api/rst/bge.texture.rst (+19, -9) (Diff)
/source/gameengine/Rasterizer/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_IOffScreen.h (+3, -2) (Diff)
/source/gameengine/Rasterizer/RAS_IRasterizer.h (+7, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt (+2, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLOffScreen.cpp (+11, -2) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLOffScreen.h (+1, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp (+15, -0) (Diff)
/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h (+1, -0) (Diff)
/source/gameengine/VideoTexture/ImageRender.cpp (+71, -4) (Diff)
/source/gameengine/VideoTexture/ImageRender.h (+8, -0) (Diff)
/source/gameengine/VideoTexture/ImageViewport.cpp (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021