[Bf-blender-cvs] [0120e30] temp-decklink: Cleanup: formatting, also add header guards

Campbell Barton noreply at git.blender.org
Fri Jun 10 01:10:55 CEST 2016


Commit: 0120e30406a8bcb6c403f5f00d1de51c03187826
Author: Campbell Barton
Date:   Fri Jun 10 08:59:53 2016 +1000
Branches: temp-decklink
https://developer.blender.org/rB0120e30406a8bcb6c403f5f00d1de51c03187826

Cleanup: formatting, also add header guards

===================================================================

M	doc/python_api/rst/bge.logic.rst
M	doc/python_api/rst/bge.render.rst
M	doc/python_api/rst/bge.texture.rst
M	source/gameengine/Ketsji/KX_KetsjiEngine.cpp
M	source/gameengine/Ketsji/KX_KetsjiEngine.h
M	source/gameengine/Ketsji/KX_PythonInit.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLOffScreen.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLOffScreen.h
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLSync.cpp
M	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLSync.h
M	source/gameengine/VideoTexture/FilterBase.h
M	source/gameengine/VideoTexture/FilterSource.h
M	source/gameengine/VideoTexture/ImageBase.cpp
M	source/gameengine/VideoTexture/ImageRender.cpp
M	source/gameengine/VideoTexture/ImageRender.h
M	source/gameengine/VideoTexture/ImageViewport.cpp
M	source/gameengine/VideoTexture/Texture.cpp
M	source/gameengine/VideoTexture/VideoBase.cpp

===================================================================

diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst
index 0967610..5cdb8eb 100644
--- a/doc/python_api/rst/bge.logic.rst
+++ b/doc/python_api/rst/bge.logic.rst
@@ -385,9 +385,10 @@ General functions
    If False, the render is skipped and another logic frame starts immediately.
 
    .. note::
+
       GPU VSync no longer limits the number of frame per second when render is off, 
-      but the 'Use Frame Rate' option still regulates the fps. To run as many frames
-      as possible, untick this option (Render Properties, System panel)
+      but the *Use Frame Rate* option still regulates the fps. To run as many frames
+      as possible, untick this option (Render Properties, System panel).
 
    :arg render: the render flag
    :type render: bool
diff --git a/doc/python_api/rst/bge.render.rst b/doc/python_api/rst/bge.render.rst
index 0c6f9a9..02c3bee 100644
--- a/doc/python_api/rst/bge.render.rst
+++ b/doc/python_api/rst/bge.render.rst
@@ -98,6 +98,7 @@ Constants
 
    The pixel buffer for offscreen render is a Texture. Argument to :func:`offScreenCreate`
 
+
 *****
 Types
 *****
@@ -107,8 +108,8 @@ Types
    An off-screen render buffer object. 
 
    Use :func:`offScreenCreate` to create it.
-   Currently it can only be used in the :class:`bge.texture.ImageRender` constructor to render on a FBO rather than the 
-   default viewport.
+   Currently it can only be used in the :class:`bge.texture.ImageRender`
+   constructor to render on a FBO rather than the default viewport.
 
   .. attribute:: width
 
@@ -124,10 +125,14 @@ Types
 
   .. attribute:: color
 
-     The underlying OpenGL bind code of the texture object that holds the rendered image, 0 if the FBO is using RenderBuffer. The choice between RenderBuffer and Texture is determined by the target argument of :func:`offScreenCreate`.
+     The underlying OpenGL bind code of the texture object that holds
+     the rendered image, 0 if the FBO is using RenderBuffer.
+     The choice between RenderBuffer and Texture is determined
+     by the target argument of :func:`offScreenCreate`.
 
      :type: integer
 
+
 *********
 Functions
 *********
@@ -410,7 +415,11 @@ Functions
    :type height: integer
    :arg samples: the number of multisample for anti-aliasing (MSAA), 0 to disable MSAA
    :type samples: integer
-   :arg target: the pixel storage: :data:`RAS_OFS_RENDER_BUFFER` to render on RenderBuffers (the default), :data:`RAS_OFS_RENDER_TEXTURE` to render on texture. The later is interesting if you want to access the texture directly (see :attr:`RASOffScreen.color`). Otherwise the default is preferable as it's more widely supported by GPUs and more efficient. If the GPU does not support MSAA+Texture (e.g. Intel HD GPU), MSAA will be disabled.
+   :arg target: the pixel storage: :data:`RAS_OFS_RENDER_BUFFER` to render on RenderBuffers (the default),
+      :data:`RAS_OFS_RENDER_TEXTURE` to render on texture. 
+      The later is interesting if you want to access the texture directly (see :attr:`RASOffScreen.color`).
+      Otherwise the default is preferable as it's more widely supported by GPUs and more efficient.
+      If the GPU does not support MSAA+Texture (e.g. Intel HD GPU), MSAA will be disabled.
    :type target: integer
    :rtype: :class:`RASOffScreen`
 
diff --git a/doc/python_api/rst/bge.texture.rst b/doc/python_api/rst/bge.texture.rst
index f753bab..e226d2f 100644
--- a/doc/python_api/rst/bge.texture.rst
+++ b/doc/python_api/rst/bge.texture.rst
@@ -173,19 +173,23 @@ Video classes
       :return: Whether the video was playing.
       :rtype: bool
 
-   .. method:: refresh(buffer=None, format="RGBA", ts=-1.0)
+   .. method:: refresh(buffer=None, format="RGBA", timestamp=-1.0)
 
       Refresh video - get its status and optionally copy the frame to an external buffer.
 
-      :arg buffer: An optional object that implements the buffer protocol. If specified, the image is copied to the buffer, which must be big enough or an exception is thrown.
+      :arg buffer: An optional object that implements the buffer protocol.
+         If specified, the image is copied to the buffer, which must be big enough or an exception is thrown.
       :type buffer: any buffer type
-      :arg format: An optional image format specifier for the image that will be copied to the buffer. Only valid values are "RGBA" or "BGRA"
+      :arg format: An optional image format specifier for the image that will be copied to the buffer.
+         Only valid values are "RGBA" or "BGRA"
       :type format: str
-      :arg ts: An optional timestamp (in seconds from the start of the movie) of the frame to be copied to the buffer.
-      :type ts: float
+      :arg timestamp: An optional timestamp (in seconds from the start of the movie)
+         of the frame to be copied to the buffer.
+      :type timestamp: float
       :return: see `FFmpeg Video and Image Status`_.
       :rtype: int
 
+
 *************
 Image classes
 *************
@@ -253,9 +257,11 @@ Image classes
 
       Refresh image, get its status and optionally copy the frame to an external buffer.
       
-      :arg buffer: An optional object that implements the buffer protocol. If specified, the image is copied to the buffer, which must be big enough or an exception is thrown.
+      :arg buffer: An optional object that implements the buffer protocol.
+         If specified, the image is copied to the buffer, which must be big enough or an exception is thrown.
       :type buffer: any buffer type
-      :arg format: An optional image format specifier for the image that will be copied to the buffer. Only valid values are "RGBA" or "BGRA"
+      :arg format: An optional image format specifier for the image that will be copied to the buffer.
+         Only valid values are "RGBA" or "BGRA"
       :type format: str
       :return: see `FFmpeg Video and Image Status`_.
       :rtype: int
@@ -421,11 +427,15 @@ Image classes
 
    .. method:: refresh(buffer=None, format="RGBA")
 
-      Refresh image - render and copy the image to an external buffer (optional) then invalidate its current content.
+      Refresh image - render and copy the image to an external buffer (optional)
+      then invalidate its current content.
 
-      :arg buffer: An optional object that implements the buffer protocol. If specified, the image is rendered and copied to the buffer, which must be big enough or an exception is thrown.
+      :arg buffer: An optional object that implements the buffer protocol.
+         If specified, the image is rendered and copied to the buffer,
+         which must be big enough or an exception is thrown.
       :type buffer: any buffer type
-      :arg format: An optional image format specifier for the image that will be copied to the buffer. Only valid values are "RGBA" or "BGRA"
+      :arg format: An optional image format specifier for the image that will be copied to the buffer.
+         Only valid values are "RGBA" or "BGRA"
       :type format: str
 
    .. attribute:: scale
@@ -515,9 +525,12 @@ Image classes
 
       Refresh image - calculate and copy the image to an external buffer (optional) then invalidate its current content.
 
-      :arg buffer: An optional object that implements the buffer protocol. If specified, the image is calculated and copied to the buffer, which must be big enough or an exception is thrown.
+      :arg buffer: An optional object that implements the buffer protocol.
+         If specified, the image is calculated and copied to the buffer,
+         which must be big enough or an exception is thrown.
       :type buffer: any buffer type
-      :arg format: An optional image format specifier for the image that will be copied to the buffer. Only valid values are "RGBA" or "BGRA"
+      :arg format: An optional image format specifier for the image that will be copied to the buffer.
+         Only valid values are "RGBA" or "BGRA"
       :type format: str
 
    .. attribute:: scale
@@ -565,8 +578,9 @@ Image classes
 
 .. class:: ImageRender(scene, camera, fbo=None)
 
-   Image source from render. The render is done on a custom framebuffer object if fbo is specified, otherwise on 
-   the default framebuffer.
+   Image source from render.
+   The render is done on a custom framebuffer object if fbo is specified,
+   otherwise on the default framebuffer.
    
    :arg scene: Scene in which the image has to be taken.
    :type scene: :class:`~bge.types.KX_Scene`
@@ -659,7 +673,14 @@ Image classes
 
    .. method:: render()
 
-      Render the scene but do not extract the pixels yet. The function returns as soon as the render commands have been send to the GPU. The render will proceed asynchronously in the GPU while the host can perform other tasks. To complete the render, you can either call :func:`refresh` directly of refresh the texture of which this object is the source. This method is useful to implement asynchronous render for optimal performance: call render() on frame n and refresh() on frame n+1 to gi [...]
+      Render the scene but do not extract the pixels yet.
+      The function returns as soon as the render commands have been send to the GPU.
+      The render will proceed asynchronously in the GPU while the host can perform other tasks.
+      To complete the render, you can either call :func:`refresh`
+      directly of refresh the texture of which this object is the source.
+      This method is useful to implement asynchronous render for optimal performance: call render()
+      on frame n and refresh() on frame n+1 to give as much as time as possible to the GPU
+      to render the frame while the game engine can perform other tasks.
 
       :return: True if the render was initiated, False if the render cannot be performed (e.g. the camera is active)
       :rtype: bool
@@ -667,11 +688,21 @@ Image classes
    .. method:: refresh()
    .. method:: refresh(buffer, format="RGBA")
 
-      Refresh video - render and optionally copy the image to an external buffer then invalidate its current content. The render may have been started earlier with the :func:`render` metho

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list