blender/source/gameengine/VideoTexture
Benoit Bolsee 445d077cf4 BGE: Add plot method to VideoTexture.ImageBuff class.
Synopsis: plot(brush,width,height,x,y,mode)
          plot(imgbuff,x,y,mode)

The first form uses a byte array containing the brush shape.
The second form uses another ImageBuff object as a brush.
The ImageBuff object must be initialized before you can call
these methods. Use load(rgb_buffer,sizex,sizey) method to create
an image buffer of given size (with alpha channel set to 255).
The brush is plotted directly in the image buffer. The texture
is updated only when the VideoTexture.Texture parent object is
refreshed: this will download the image buffer to the GPU.

brush:  Byte array containing RGBA data to be plotted in image buffer.
        The data must be continuous in memory, organized row by row
        starting from lower left corner of the image. Each pixel is
        4 bytes representing RGBA data in that order.
width:  Horizontal size in pixels of image in brush.
height: Vertical size in pixels of the image in brush.
imgbuff:Another ImageBuff object that is used as a brush. The object
        must have been initialized first with load().
x:      Horizontal position in pixel from left side of the image buffer
        where the brush will be plotted. The brush is plotted on pixels
        positions x->x+width-1. Clipping is performed if the brush falls
        partially outside the image buffer.
y:      Vertical position in pixel from bottom side of the image buffer
        where the brush will be plotted.
mode:   Mode of drawing. Use one of the following value:
        0 : MIX
        1 : ADD
	2 : SUB
        3 : MUL
        4 : LIGHTEN
        5 : DARKEN
        6 : ERASE ALPHA
        7 : ADD ALPHA
        1000 : COPY RGBA (default)
        1001 : COPY RGB
        1002 : COPY ALPHA

        Modes 0 to 7 are 'blend' modes: the brush pixels are combined
        with the image pixel in various ways. Refer to Blender documentation
        to learn more about these modes.
2009-12-08 10:02:22 +00:00
..
BlendType.h 2.50: 2009-06-08 20:08:19 +00:00
blendVideoTex.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
CMakeLists.txt option to build the BGE without python, uses existing python check (cmake and scons) 2009-09-29 21:42:40 +00:00
Common.h VideoTexture module. 2008-10-31 22:35:52 +00:00
Exception.cpp [#19226] (2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc 2009-08-22 17:19:31 +00:00
Exception.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
FilterBase.cpp remove warnings for the BGE 2009-02-25 03:26:02 +00:00
FilterBase.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterBlueScreen.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
FilterBlueScreen.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterColor.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
FilterColor.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterNormal.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
FilterNormal.h VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
FilterSource.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
FilterSource.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD 2009-04-20 15:06:46 +00:00
ImageBase.cpp - fix for BGE warnings 2009-08-19 10:26:43 +00:00
ImageBase.h VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
ImageBuff.cpp BGE: Add plot method to VideoTexture.ImageBuff class. 2009-12-08 10:02:22 +00:00
ImageBuff.h BGE: Add plot method to VideoTexture.ImageBuff class. 2009-12-08 10:02:22 +00:00
ImageMix.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
ImageMix.h VideoTexture module. 2008-10-31 22:35:52 +00:00
ImageRender.cpp Math Lib 2009-11-10 20:43:45 +00:00
ImageRender.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
ImageViewport.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
ImageViewport.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
Makefile 2.5 audio cleanup: 2009-08-10 15:39:11 +00:00
PyTypeList.cpp 2.50: 2009-06-08 20:08:19 +00:00
PyTypeList.h VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
SConscript option to build the BGE without python, uses existing python check (cmake and scons) 2009-09-29 21:42:40 +00:00
Texture.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
Texture.h 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
VideoBase.cpp BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x 2009-06-29 02:25:54 +00:00
VideoBase.h 2.50: 2009-06-08 20:08:19 +00:00
VideoFFmpeg.cpp remove python2.x support 2009-08-10 00:07:34 +00:00
VideoFFmpeg.h * due to the setup of headers in mingw 4.4.0, includes could mess up. Making sure that windows.h isn't included where it shouln't (outside of __cplusplus) 2009-10-02 15:51:25 +00:00