Difference between revisions of "RenderTarget.new"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(6 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Creates a new RenderTarget object.
 
Creates a new RenderTarget object.
<source lang="lua">
+
<syntaxhighlight lang="lua">
RenderTarget.new(width,height,filtering,repeating,autoscale,depth,format)
+
RenderTarget.new(width,height,filtering,repeating,autoscale,depth,format,extend)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
 
'''width''': (number) width of rendered texture<br/>
 
'''width''': (number) width of rendered texture<br/>
 
'''height''': (number) height of rendered texture<br/>
 
'''height''': (number) height of rendered texture<br/>
'''filtering''': (boolean) sets texture filtering ('''default = false''')<br/>
+
'''filtering''': (boolean) set texture filtering, that is smoothing the image ('''default = false''')<br/>
'''repeating''': (boolean) sets texture repeating ('''default = false''')<br/>
+
'''repeating''': (boolean) set texture repeating ('''default = false''')<br/>
 
'''autoscale''': (boolean) whether the actual texture size should be scaled to match display resolution ('''default = false''')<br/>
 
'''autoscale''': (boolean) whether the actual texture size should be scaled to match display resolution ('''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/>
+
'''depth''': (boolean) indicate 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/>
 +
'''extend''': (boolean) extend the texture to a power of two size internally '''since Gideros 2022.5.1''' ('''default = true''')<br/>
  
 
{{RenderTarget}}
 
{{RenderTarget}}

Latest revision as of 15:32, 13 July 2023

Available since: Gideros 2013.06
Class: RenderTarget

Description

Creates a new RenderTarget object.

RenderTarget.new(width,height,filtering,repeating,autoscale,depth,format,extend)

Parameters

width: (number) width of rendered texture
height: (number) height of rendered texture
filtering: (boolean) set texture filtering, that is smoothing the image (default = false)
repeating: (boolean) set texture repeating (default = false)
autoscale: (boolean) whether the actual texture size should be scaled to match display resolution (default = false)
depth: (boolean) indicate 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) extend the texture to a power of two size internally since Gideros 2022.5.1 (default = true)