bge.texture doc, needed whitespace to format correctly.
This commit is contained in:
@@ -45,61 +45,77 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
FFmpeg video source
|
FFmpeg video source
|
||||||
|
|
||||||
.. attribute:: status
|
.. attribute:: status
|
||||||
|
|
||||||
video status
|
video status
|
||||||
|
|
||||||
.. attribute:: range
|
.. attribute:: range
|
||||||
|
|
||||||
replay range
|
replay range
|
||||||
|
|
||||||
.. attribute:: repeat
|
.. attribute:: repeat
|
||||||
|
|
||||||
repeat count, -1 for infinite repeat
|
repeat count, -1 for infinite repeat
|
||||||
|
|
||||||
:type: int
|
:type: int
|
||||||
|
|
||||||
.. attribute:: framerate
|
.. attribute:: framerate
|
||||||
|
|
||||||
frame rate
|
frame rate
|
||||||
|
|
||||||
:type: float
|
:type: float
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
Tells if an image is available
|
Tells if an image is available
|
||||||
|
|
||||||
:type: bool
|
:type: bool
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: preseek
|
.. attribute:: preseek
|
||||||
|
|
||||||
number of frames of preseek
|
number of frames of preseek
|
||||||
|
|
||||||
:type: int
|
:type: int
|
||||||
|
|
||||||
.. attribute:: deinterlace
|
.. attribute:: deinterlace
|
||||||
|
|
||||||
deinterlace image
|
deinterlace image
|
||||||
|
|
||||||
:type: bool
|
:type: bool
|
||||||
|
|
||||||
.. method:: play()
|
.. method:: play()
|
||||||
|
|
||||||
Play (restart) video
|
Play (restart) video
|
||||||
|
|
||||||
.. method:: pause()
|
.. method:: pause()
|
||||||
|
|
||||||
pause video
|
pause video
|
||||||
|
|
||||||
.. method:: stop()
|
.. method:: stop()
|
||||||
|
|
||||||
stop video (play will replay it from start)
|
stop video (play will replay it from start)
|
||||||
|
|
||||||
.. method:: refresh()
|
.. method:: refresh()
|
||||||
|
|
||||||
Refresh video - get its status
|
Refresh video - get its status
|
||||||
|
|
||||||
.. class:: ImageFFmpeg(file)
|
.. class:: ImageFFmpeg(file)
|
||||||
@@ -107,32 +123,41 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
FFmpeg image source
|
FFmpeg image source
|
||||||
|
|
||||||
.. attribute:: status
|
.. attribute:: status
|
||||||
|
|
||||||
video status
|
video status
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
Tells if an image is available
|
Tells if an image is available
|
||||||
|
|
||||||
:type: bool
|
:type: bool
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. method:: refresh()
|
.. method:: refresh()
|
||||||
|
|
||||||
Refresh image, i.e. load it
|
Refresh image, i.e. load it
|
||||||
|
|
||||||
.. method:: reload([newname])
|
.. method:: reload([newname])
|
||||||
|
|
||||||
Reload image, i.e. reopen it
|
Reload image, i.e. reopen it
|
||||||
|
|
||||||
.. class:: ImageBuff()
|
.. class:: ImageBuff()
|
||||||
@@ -140,27 +165,35 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Image source from image buffer
|
Image source from image buffer
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. method:: load(imageBuffer, width, height)
|
.. method:: load(imageBuffer, width, height)
|
||||||
|
|
||||||
Load image from buffer
|
Load image from buffer
|
||||||
|
|
||||||
.. method:: plot(imageBuffer, width, height, positionX, positionY)
|
.. method:: plot(imageBuffer, width, height, positionX, positionY)
|
||||||
|
|
||||||
update image buffer
|
update image buffer
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
bool to tell if an image is available
|
bool to tell if an image is available
|
||||||
|
|
||||||
.. class:: ImageMirror(scene)
|
.. class:: ImageMirror(scene)
|
||||||
@@ -168,39 +201,51 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Image source from mirror
|
Image source from mirror
|
||||||
|
|
||||||
.. attribute:: alpha
|
.. attribute:: alpha
|
||||||
|
|
||||||
use alpha in texture
|
use alpha in texture
|
||||||
|
|
||||||
.. attribute:: background
|
.. attribute:: background
|
||||||
|
|
||||||
background color
|
background color
|
||||||
|
|
||||||
.. attribute:: capsize
|
.. attribute:: capsize
|
||||||
|
|
||||||
size of render area
|
size of render area
|
||||||
|
|
||||||
.. attribute:: clip
|
.. attribute:: clip
|
||||||
|
|
||||||
clipping distance
|
clipping distance
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. method:: refresh(imageMirror)
|
.. method:: refresh(imageMirror)
|
||||||
|
|
||||||
Refresh image - invalidate its current content
|
Refresh image - invalidate its current content
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
bool to tell if an image is available
|
bool to tell if an image is available
|
||||||
|
|
||||||
.. attribute:: whole
|
.. attribute:: whole
|
||||||
|
|
||||||
use whole viewport to render
|
use whole viewport to render
|
||||||
|
|
||||||
.. class:: ImageMix()
|
.. class:: ImageMix()
|
||||||
@@ -208,33 +253,44 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Image mixer
|
Image mixer
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. method:: getSource(imageMix)
|
.. method:: getSource(imageMix)
|
||||||
|
|
||||||
get image source
|
get image source
|
||||||
|
|
||||||
.. method:: getWeight(imageMix)
|
.. method:: getWeight(imageMix)
|
||||||
|
|
||||||
get image source weight
|
get image source weight
|
||||||
|
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. method:: refresh(imageMix)
|
.. method:: refresh(imageMix)
|
||||||
|
|
||||||
Refresh image - invalidate its current content
|
Refresh image - invalidate its current content
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. method:: setSource(imageMix)
|
.. method:: setSource(imageMix)
|
||||||
|
|
||||||
set image source
|
set image source
|
||||||
|
|
||||||
.. method:: setWeight(imageMix)
|
.. method:: setWeight(imageMix)
|
||||||
|
|
||||||
set image source weight
|
set image source weight
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
bool to tell if an image is available
|
bool to tell if an image is available
|
||||||
|
|
||||||
.. class:: ImageRender(scene, camera)
|
.. class:: ImageRender(scene, camera)
|
||||||
@@ -242,36 +298,47 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Image source from render
|
Image source from render
|
||||||
|
|
||||||
.. attribute:: alpha
|
.. attribute:: alpha
|
||||||
|
|
||||||
use alpha in texture
|
use alpha in texture
|
||||||
|
|
||||||
.. attribute:: background
|
.. attribute:: background
|
||||||
|
|
||||||
background color
|
background color
|
||||||
|
|
||||||
.. attribute:: capsize
|
.. attribute:: capsize
|
||||||
|
|
||||||
size of render area
|
size of render area
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. method:: refresh(imageRender)
|
.. method:: refresh(imageRender)
|
||||||
|
|
||||||
Refresh image - invalidate its current content
|
Refresh image - invalidate its current content
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
bool to tell if an image is available
|
bool to tell if an image is available
|
||||||
|
|
||||||
.. attribute:: whole
|
.. attribute:: whole
|
||||||
|
|
||||||
use whole viewport to render
|
use whole viewport to render
|
||||||
|
|
||||||
.. class:: ImageViewport()
|
.. class:: ImageViewport()
|
||||||
@@ -279,36 +346,47 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Image source from viewport
|
Image source from viewport
|
||||||
|
|
||||||
.. attribute:: alpha
|
.. attribute:: alpha
|
||||||
|
|
||||||
use alpha in texture
|
use alpha in texture
|
||||||
|
|
||||||
.. attribute:: capsize
|
.. attribute:: capsize
|
||||||
|
|
||||||
size of viewport area being captured
|
size of viewport area being captured
|
||||||
|
|
||||||
.. attribute:: filter
|
.. attribute:: filter
|
||||||
|
|
||||||
pixel filter
|
pixel filter
|
||||||
|
|
||||||
.. attribute:: flip
|
.. attribute:: flip
|
||||||
|
|
||||||
flip image vertically
|
flip image vertically
|
||||||
|
|
||||||
.. attribute:: image
|
.. attribute:: image
|
||||||
|
|
||||||
image data
|
image data
|
||||||
|
|
||||||
.. attribute:: position
|
.. attribute:: position
|
||||||
|
|
||||||
upper left corner of captured area
|
upper left corner of captured area
|
||||||
|
|
||||||
.. method:: refresh(imageViewport)
|
.. method:: refresh(imageViewport)
|
||||||
|
|
||||||
Refresh image - invalidate its current content
|
Refresh image - invalidate its current content
|
||||||
|
|
||||||
.. attribute:: scale
|
.. attribute:: scale
|
||||||
|
|
||||||
fast scale of image (near neighbour)
|
fast scale of image (near neighbour)
|
||||||
|
|
||||||
.. attribute:: size
|
.. attribute:: size
|
||||||
|
|
||||||
image size
|
image size
|
||||||
|
|
||||||
.. attribute:: valid
|
.. attribute:: valid
|
||||||
|
|
||||||
bool to tell if an image is available
|
bool to tell if an image is available
|
||||||
|
|
||||||
.. attribute:: whole
|
.. attribute:: whole
|
||||||
|
|
||||||
use whole viewport to capture
|
use whole viewport to capture
|
||||||
|
|
||||||
.. class:: Texture(gameObj)
|
.. class:: Texture(gameObj)
|
||||||
@@ -316,18 +394,23 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Texture objects
|
Texture objects
|
||||||
|
|
||||||
.. attribute:: bindId
|
.. attribute:: bindId
|
||||||
|
|
||||||
OpenGL Bind Name
|
OpenGL Bind Name
|
||||||
|
|
||||||
.. method:: close(texture)
|
.. method:: close(texture)
|
||||||
|
|
||||||
Close dynamic texture and restore original
|
Close dynamic texture and restore original
|
||||||
|
|
||||||
.. attribute:: mipmap
|
.. attribute:: mipmap
|
||||||
|
|
||||||
mipmap texture
|
mipmap texture
|
||||||
|
|
||||||
.. method:: refresh(texture)
|
.. method:: refresh(texture)
|
||||||
|
|
||||||
Refresh texture from source
|
Refresh texture from source
|
||||||
|
|
||||||
.. attribute:: source
|
.. attribute:: source
|
||||||
|
|
||||||
source of texture
|
source of texture
|
||||||
|
|
||||||
.. class:: FilterBGR24()
|
.. class:: FilterBGR24()
|
||||||
@@ -339,12 +422,15 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Filter for Blue Screen objects
|
Filter for Blue Screen objects
|
||||||
|
|
||||||
.. attribute:: color
|
.. attribute:: color
|
||||||
|
|
||||||
blue screen color
|
blue screen color
|
||||||
|
|
||||||
.. attribute:: limits
|
.. attribute:: limits
|
||||||
|
|
||||||
blue screen color limits
|
blue screen color limits
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
previous pixel filter
|
previous pixel filter
|
||||||
|
|
||||||
.. class:: FilterColor()
|
.. class:: FilterColor()
|
||||||
@@ -352,9 +438,11 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Filter for color calculations
|
Filter for color calculations
|
||||||
|
|
||||||
.. attribute:: matrix
|
.. attribute:: matrix
|
||||||
|
|
||||||
matrix [4][5] for color calculation
|
matrix [4][5] for color calculation
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
previous pixel filter
|
previous pixel filter
|
||||||
|
|
||||||
.. class:: FilterGray()
|
.. class:: FilterGray()
|
||||||
@@ -362,6 +450,7 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Filter for gray scale effect
|
Filter for gray scale effect
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
previous pixel filter
|
previous pixel filter
|
||||||
|
|
||||||
.. class:: FilterLevel()
|
.. class:: FilterLevel()
|
||||||
@@ -369,9 +458,11 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Filter for levels calculations
|
Filter for levels calculations
|
||||||
|
|
||||||
.. attribute:: levels
|
.. attribute:: levels
|
||||||
|
|
||||||
levels matrix [4] (min, max)
|
levels matrix [4] (min, max)
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
previous pixel filter
|
previous pixel filter
|
||||||
|
|
||||||
.. class:: FilterNormal()
|
.. class:: FilterNormal()
|
||||||
@@ -379,12 +470,15 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Filter for Blue Screen objects
|
Filter for Blue Screen objects
|
||||||
|
|
||||||
.. attribute:: colorIdx
|
.. attribute:: colorIdx
|
||||||
|
|
||||||
index of color used to calculate normal (0 - red, 1 - green, 2 - blue)
|
index of color used to calculate normal (0 - red, 1 - green, 2 - blue)
|
||||||
|
|
||||||
.. attribute:: depth
|
.. attribute:: depth
|
||||||
|
|
||||||
depth of relief
|
depth of relief
|
||||||
|
|
||||||
.. attribute:: previous
|
.. attribute:: previous
|
||||||
|
|
||||||
previous pixel filter
|
previous pixel filter
|
||||||
|
|
||||||
.. class:: FilterRGB24()
|
.. class:: FilterRGB24()
|
||||||
@@ -397,12 +491,14 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
Source filter RGBA32 objects
|
Source filter RGBA32 objects
|
||||||
|
|
||||||
.. function:: getLastError()
|
.. function:: getLastError()
|
||||||
|
|
||||||
Last error that occurred in a bge.texture function.
|
Last error that occurred in a bge.texture function.
|
||||||
|
|
||||||
:return: the description of the last error occurred in a bge.texture function.
|
:return: the description of the last error occurred in a bge.texture function.
|
||||||
:rtype: string
|
:rtype: string
|
||||||
|
|
||||||
.. function:: imageToArray(image,mode)
|
.. function:: imageToArray(image,mode)
|
||||||
|
|
||||||
Returns a :class:`~bgl.buffer` corresponding to the current image stored in a texture source object.
|
Returns a :class:`~bgl.buffer` corresponding to the current image stored in a texture source object.
|
||||||
|
|
||||||
:arg image: Image source object.
|
:arg image: Image source object.
|
||||||
@@ -421,6 +517,7 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
.. function materialID(object,name)
|
.. function materialID(object,name)
|
||||||
|
|
||||||
Returns a numeric value that can be used in :class:`Texture` to create a dynamic texture.
|
Returns a numeric value that can be used in :class:`Texture` to create a dynamic texture.
|
||||||
|
|
||||||
The value corresponds to an internal material number that uses the texture identified
|
The value corresponds to an internal material number that uses the texture identified
|
||||||
@@ -442,6 +539,7 @@ When the texture object is deleted, the new texture is deleted and the old textu
|
|||||||
:rtype: integer
|
:rtype: integer
|
||||||
|
|
||||||
.. function setLogFile(filename)
|
.. function setLogFile(filename)
|
||||||
|
|
||||||
Sets the name of a text file in which runtime error messages will be written, in addition to the printing
|
Sets the name of a text file in which runtime error messages will be written, in addition to the printing
|
||||||
of the messages on the Python console. Only the runtime errors specific to the VideoTexture module
|
of the messages on the Python console. Only the runtime errors specific to the VideoTexture module
|
||||||
are written in that file, ordinary runtime time errors are not written.
|
are written in that file, ordinary runtime time errors are not written.
|
||||||
|
Reference in New Issue
Block a user