目录

Texture

Class Info

public class Texture implements Resource

纹理资源。

Public Method Summary

Qualifier and Type

Method Name and Description

static Resource.Builder<Texture>

builder()

获取纹理资源建造者实例。

static Texture

createOES(int width, int height)

创建OpenGL OES纹理。

static Texture

createOES(String name, int width, int height)

创建带名字的OpenGL OES纹理。

static void

destroy(Texture texture)

销毁纹理资源。

int

getTexIdGL()

获取OpenGL的纹理贴图ID。

Public Methods

[h2]builder

Method

public Resource.Builder<Texture> builder()

获取纹理资源建造者实例。

Returns

Type

Description

Resource.Builder<Texture>

纹理资源建造者实例。

[h2]createOES(int width, int height)

Method

public static Texture createOES(int width, int height)

创建OpenGL OES纹理。

Parameters

Name

Description

width

纹理宽度,大于0,单位pixel。

height

纹理高度,大于0,单位pixel。

Returns

Type

Description

Texture

纹理实例。

[h2]createOES(String name, int width, int height)

Method

public static Texture createOES(String name, int width, int height)

创建带名字的OpenGL OES纹理。

Parameters

Name

Description

name

纹理名。

width

纹理宽度,单位pixel。

height

纹理高度,单位pixel。

Returns

Type

Description

Texture

纹理实例。

[h2]destroy

Method

public static void destroy(Texture texture)

销毁纹理资源。

Parameters

Name

Description

texture

需要销毁的纹理资源。

[h2]getTexIdGL

Method

public int getTexIdGL()

获取OpenGL的纹理贴图ID。

Returns

Type

Description

int

OpenGL纹理ID。