EnableRenderToTexture
From MaratisWiki
(Difference between revisions)
Dahnielson (Talk | contribs) m |
Dahnielson (Talk | contribs) m |
||
| Line 1: | Line 1: | ||
{{lua-function|enableRenderToTexture|object, texture, width, height}} | {{lua-function|enableRenderToTexture|object, texture, width, height}} | ||
| − | Enables a camera to render directly to a texture | + | Enables a camera to render directly to a texture. |
| + | |||
| + | {{lua-function-param|object|object to operate on}} | ||
| + | {{lua-function-param|texture|texture to replace}} | ||
| + | {{lua-function-param|width|width}} | ||
| + | {{lua-function-param|height|height}} | ||
'''Example:''' Will replace the texture "maps/texture.png" by the render of the camera with a 256x256 resolution. | '''Example:''' Will replace the texture "maps/texture.png" by the render of the camera with a 256x256 resolution. | ||
Latest revision as of 00:12, 9 February 2014
enableRenderToTexture(object, texture, width, height)
Enables a camera to render directly to a texture.
-
object: object to operate on -
texture: texture to replace -
width: width -
height: height
Example: Will replace the texture "maps/texture.png" by the render of the camera with a 256x256 resolution.
Camera = getObject("Camera")
enableRenderToTexture(Camera, "maps/texture.png", 256, 256)