Class CopyTextureToTexture
Constructors
constructor
-
new CopyTextureToTexture(
engine: AbstractEngine,
isDepthTexture?: boolean,
sameSizeCopy?: boolean,
): CopyTextureToTextureConstructs a new instance of the class
Parameters
- engine: AbstractEngine
The engine to use for the copy
- isDepthTexture: boolean = false
True means that we should write (using gl_FragDepth) into the depth texture attached to the destination (default: false)
- sameSizeCopy: boolean = false
True means that the copy will be done without any sampling (more efficient, but requires the source and destination to be of the same size) (default: false)
Returns CopyTextureToTexture
- engine: AbstractEngine
Accessors
effect Wrapper
-
Gets the effect wrapper used for the copy
Returns EffectWrapper
lod Level
-
get lodLevel(): number
Gets or sets the LOD level to copy from the source texture
Returns number
-
set lodLevel(level: number): void
Parameters
- level: number
Returns void
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language
Returns ShaderLanguage
source
-
Gets or sets the source texture
Returns ThinTexture | InternalTexture
-
Parameters
- texture: ThinTexture | InternalTexture
Returns void
Methods
copy
-
copy(
source: ThinTexture | InternalTexture,
destination?: Nullable<RenderTargetWrapper | IRenderTargetTexture>,
conversion?: ConversionMode,
lod?: number,
): booleanCopy one texture into another
Parameters
- source: ThinTexture | InternalTexture
The source texture
- destination: Nullable<RenderTargetWrapper | IRenderTargetTexture> = null
The destination texture. If null, copy the source to the currently bound framebuffer
- conversion: ConversionMode = ConversionMode.None
The conversion mode that should be applied when copying
- lod: number = 0
The LOD level to copy from the source texture
Returns boolean
- source: ThinTexture | InternalTexture
dispose
-
Releases all the resources used by the class
Returns void
is Ready
-
Indicates if the effect is ready to be used for the copy
Returns boolean
true if "copy" can be called without delay, else false
Class used for fast copy from one texture to another