EnableRenderToTexture
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
| Line 1: | Line 1: | ||
| − | + | {{lua-function|enableRenderToTexture|object, texture, width, height}} | |
| + | Enables a camera to render directly to a texture | ||
| − | Example | + | '''Example:''' Will replace the texture "maps/texture.png" by the render of the camera with a 256x256 resolution. |
Camera = getObject("Camera") | Camera = getObject("Camera") | ||
Revision as of 17:26, 8 February 2014
enableRenderToTexture(object, texture, width, height)
Enables a camera to render directly to a texture
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)