Last updated

API / geotoolkit / webgl / Texture / Texture

Class: Texture

webgl.Texture.Texture

This class create a texture for WebGL.

Table of contents

Constructors
Methods

Contents

Constructors

new Texture(options)

new Texture(options)

Parameters

Name Type
optionsOptions
Methods

getAttributes

getAttributes(): Attributes

Return the attributes of the texture

Returns

Attributes

The attributes


getImage

getImage(): ArrayBufferView | HTMLCanvasElement | HTMLImageElement

Return the pixel source of this texture

Returns

ArrayBufferView | HTMLCanvasElement | HTMLImageElement

the pixel source


getName

getName(): string

Return the name of the texture

Returns

string

the name of the texture


setFilter

setFilter(magFilter?, minFilter?): Texture

Set how this texture is sampled when a texel covers more or less than a pixel

Parameters

Name Type Description
Optional magFilternumbertexel covers more than a pixel
Optional minFilternumbertexel covers less than a pixel

Returns

Texture

this


setFlipY

setFlipY(flag): Texture

Set whether to flip texture along vertical axis

Parameters

Name Type Description
flagbooleanthe flag

Returns

Texture

this


setFormat

setFormat(format): Texture

Set the format of texel data

Parameters

Name Type Description
formatnumberthe format

Returns

Texture

this


setImage

setImage(image): Texture

Set image for this texture

Parameters

Name Type Description
imageArrayBufferView | HTMLCanvasElement | HTMLImageElementthe pixel source

Returns

Texture

this


setName

setName(name): Texture

Set name for this texture

Parameters

Name Type Description
namestringthe attribute name

Returns

Texture

this


setType

setType(type): Texture

Set the data type oof texel data

Parameters

Name Type Description
typenumberthe data type

Returns

Texture

this


setWrap

setWrap(U?, V?): Texture

Set how this texture is wrapped in UV mapping.

Parameters

Name Type Description
Optional Unumberthe U in UV mapping
Optional Vnumberthe V in UV mapping

Returns

Texture

this