Difference between revisions of "RenderTarget.new"
Line 17: | Line 17: | ||
'''depth''': (boolean) indicates this rendertarget will hold depth component. Setting this to true creates a render target suitable for shadow mapping ('''default = false''')<br/> | '''depth''': (boolean) indicates this rendertarget will hold depth component. Setting this to true creates a render target suitable for shadow mapping ('''default = false''')<br/> | ||
'''format''': (string) specify the wanted pixel format for this render target. Use ones of the [[TextureBase]] format constants, or leave nil for default ('''default = [[TextureBase.RGBA8888]]''')<br/> | '''format''': (string) specify the wanted pixel format for this render target. Use ones of the [[TextureBase]] format constants, or leave nil for default ('''default = [[TextureBase.RGBA8888]]''')<br/> | ||
+ | '''extend''': (boolean) extends the texture to a power of two size internally '''since Gidros 2022.5.1''' ('''default = true''')<br/> | ||
{{RenderTarget}} | {{RenderTarget}} |
Revision as of 10:19, 28 April 2022
Available since: Gideros 2013.06
Class: RenderTarget
Description
Creates a new RenderTarget object.
RenderTarget.new(width,height,filtering,repeating,autoscale,depth,format)
Parameters
width: (number) width of rendered texture
height: (number) height of rendered texture
filtering: (boolean) sets texture filtering (default = false)
repeating: (boolean) sets texture repeating (default = false)
autoscale: (boolean) whether the actual texture size should be scaled to match display resolution (default = false)
depth: (boolean) indicates this rendertarget will hold depth component. Setting this to true creates a render target suitable for shadow mapping (default = false)
format: (string) specify the wanted pixel format for this render target. Use ones of the TextureBase format constants, or leave nil for default (default = TextureBase.RGBA8888)
extend: (boolean) extends the texture to a power of two size internally since Gidros 2022.5.1 (default = true)